Research Notebook

The Basic Recipe For Rationalizing Errors In Belief

February 3, 2019 by Alex

Behavioral-finance models are often written down so that, although each individual trader holds incorrect beliefs, market events nevertheless unfold in such a way that traders can rationalize their own errors. e.g., consider the model in Scheinkman and Xiong (2003). In this model, each individual trader knows that every other trader is over-confident, and he knows that every other trader thinks that he himself is over-confident. He just doesn’t think that they’re correct. He’s pig-headedly insists that he’s the only unbiased trader. And yet, in spite of this error, the model is set up so that he can interpret the realized price path in his own internally consistent way. Each trader thinks the price distortion caused by his own over-confidence is actually coming from the value of the option to resell at a later date to some other over-confident trader.

There’s a good reason why researchers write down models this way. The idea is to write down a model that’s exactly one-step away from a rational benchmark. That way, any new predictions made by the model can be attributed to the behavioral bias. In this post, I first outline the basic recipe for rationalizing traders’ errors in beliefs. Then, I point out something slightly paradoxical about this recipe—namely, it requires fine-tuning the model parameters. And, while a researcher can to do this fine-tuning in a theoretical model, it’s not clear who can turn the appropriate knobs in the real world. These models are like stage magic. And, while we can learn about which cognitive biases people suffer from by studying a good magician’s sleight of hand, most missing coins wind up between the couch cushions rather than in The Amazing Randi‘s pocket.

Errors In Belief

Here’s a simple framework for digesting errors in beliefs. To start with, consider a market where a trader has correct beliefs. i.e., suppose that a trader receives a noiseless signal:

    \begin{equation*} \mathit{Signal} = \mathit{News} \qquad \text{where} \qquad \mathit{News} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(0, \, 1) \end{equation*}

Then, given the trader’s optimal demand in response to this noiseless signal, suppose that the structural relationship between the trader’s noiseless signal and realized returns is given by:

    \begin{equation*} \mathit{Return} = \beta^{\star} \cdot \mathit{Signal} + \varepsilon^{\star} \qquad \text{where} \qquad \varepsilon^{\star} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(0, \, 1) \end{equation*}

We typically think that \beta^\star \in (0, \, 1) with larger values of \beta^\star indicating more informative prices. I’m using the term “structural relationship” for \beta^{\star} \overset{\scriptscriptstyle \mathrm{def}}{=} {\textstyle \frac{\partial \phantom{s}}{\partial s}} \mathrm{E}^{\star}[ \, \mathit{Return} \, | \, \mathrm{do}(\mathit{Signal} = s) \, ] because this parameter reflects the expected change in returns due to an exogenous shift in the trader’s signal. Note that this structural relationship could reflect other traders’ errors in belief, as was the case in Scheinkman and Xiong (2003).

But, in reality, suppose that the trader is over-confident about the precision of his signal. While he thinks it’s noiseless, his signal actually contains noise:

    \begin{equation*} \mathit{Signal} = \alpha \cdot \mathit{Noise} + \sqrt{1 - \alpha^2} \cdot \mathit{News} \qquad \text{where} \qquad \mathit{Noise} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(0, \, 1) \end{equation*}

And, the parameter \alpha \in [0, \, 1] governs the relative contribution of noise to the trader’s signal: \alpha = 0 corresponds to correct beliefs; whereas, \alpha = 1 corresponds to a signal that is pure noise. Then, given the trader’s optimal demand, suppose that the structural relationship between the trader’s noisy signal and realized returns is actually given by:

    \begin{equation*} \mathit{Return} = \beta \cdot \mathit{Signal} + \varepsilon \qquad \text{where} \qquad \varepsilon \sim \mathrm{N}(0, \, 1) \end{equation*}

Notice that, in reality, idiosyncratic-return shocks are no longer drawn IID. Let \rho \overset{\scriptscriptstyle \mathrm{def}}{=} \mathrm{Cor}[\mathit{News}, \, \varepsilon] denote the correlation between the news about fundamentals in the trader’s signal and idiosyncratic-return shocks. e.g., in a model of disagreement, you might think about \rho < 0 due to the existence of another trader whose disagreement stems from negatively correlated signals or negatively correlated mistakes.

The Basic Recipe

Suppose that the trader, who doesn’t realizing that he’s getting a noisy signal, is still carefully monitoring price informativeness. i.e., he’s carefully monitoring the relationship between his signal and realized returns. Here’s what it would take for this trader to rationalize his error in beliefs. Notice that the covariance of the trader’s signal and market returns is given by:

    \begin{align*} \mathrm{Cov}[\mathit{Return}, \, \mathit{Signal}] &= \mathrm{Cov}[\beta \cdot \mathit{Signal} + \varepsilon, \, \mathit{Signal}] \\ &= \mathrm{Cov}[\beta \cdot \mathit{Signal}, \,\mathit{Signal}] + \mathrm{Cov}[\varepsilon, \, \mathit{Signal}] \\ &= \beta + \mathrm{Cov}\big[ \, \varepsilon, \, \alpha \cdot \mathit{Noise} + \sqrt{1-\alpha^2} \cdot \mathit{News} \, \big] \\ &= \beta + \rho \cdot \sqrt{1-\alpha^2} \end{align*}

So, since the variance of his signal is \mathrm{Var}[\mathit{Signal}] = 1, if the trader regresses realized returns on his signal, he’ll find a slope coefficient of

    \begin{equation*} \hat{\beta}^{\text{OLS}} \overset{\scriptscriptstyle \mathrm{def}}{=} {\textstyle \frac{\mathrm{Cov}[\mathit{Return}, \, \mathit{Signal}]}{\mathrm{Var}[\mathit{Signal}]}} = \beta + \rho \cdot \sqrt{1-\alpha^2} \end{equation*}

Thus, if a researcher chooses the values of \rho and \alpha so that \beta^{\star} = \hat{\beta}^{\text{OLS}} = \beta + \rho \cdot \sqrt{1-\alpha^2}, then the trader will see data that’s consistent with his erroneous belief about his signal being noiseless.

It’s important to emphasize that, when a researcher chooses \alpha and \rho so that \beta^{\star} - \beta = \rho \cdot \sqrt{1-\alpha^2}, he’s not giving the trader correct beliefs, though. Although price informativeness will look correct to the trader, his error in beliefs will still cause returns to respond to pure noise. The covariance of noise and returns will be:

    \begin{align*} \mathrm{Cov}[\mathit{Return}, \, \mathit{Noise}] &= \mathrm{Cov}[\beta \cdot \mathit{Signal} + \varepsilon, \, \mathit{Noise}] \\ &= \mathrm{Cov}\big[ \, \beta \cdot \big( \, \alpha \cdot \mathit{Noise} + \sqrt{1-\alpha^2} \cdot \mathit{News} \, \big), \, \mathit{Noise} \, \big] + \mathrm{Cov}[\varepsilon, \, \mathit{Noise}] \\ &= \beta \cdot \alpha \end{align*}

So, returns will react to pure noise whenever \alpha > 0. And, in principle, the trader could notice this fact if he cared to inspect \mathrm{Cov}[\mathit{Return}, \, \mathit{Noise}] rather than just \mathrm{Cov}[\mathit{Return}, \, \mathit{Signal}].

Like Stage Magic

That’s how you write down a model where biased traders can rationalize their own errors in belief. The basic recipe is simple enough. Just introduce a hidden correlation into the information structure of the model (i.e., the parameter \rho) and then fine-tune this correlation so that it cancels out the effects of the trader’s behavioral bias (the parameter \alpha). It’s really pretty when this sort of cancellation takes place. Models that manage to use this basic recipe, such as Scheinkman and Xiong (2003), are really beautiful. But, this approach raises an obvious question: in the real world, why should we expect \alpha and \rho to take on the precise values needed to hide a trader’s error? Where does the required fine-tuning come from? What’s the underlying mechanism at work?

These models are like stage magic. They’re expertly scripted illusions that demonstrate how behavioral biases can go undetected… even by traders who are actively trying to detect them. And, this is not a slight. This is really informative in the same way that going to a good magic show is really informative. It teaches you something useful about the limits of human perception, about how your attention can be managed, about how you can be deceived. But, you don’t leave magic shows thinking that the next deck of cards you open will contain 52 copies of the 6\clubsuit because you happened to be thinking of that card when you opened the box. No one expects everyday situations to operate by the rules of stage magic. Most of the time, there’s no magician to carefully script the illusion. And, the same logic applies to financial markets. It’s useful to know that you can fine-tune parameters to hide an error, but we shouldn’t assume that markets typically operate with the parameters dialed in this way. Why should we? Who exactly would be the one turning the knobs?

Filed Under: Uncategorized

The Existence Of A Bubble vs. The Timing Of Its Crash

October 31, 2018 by Alex

Journalists love to talk about bubbles. The Wall Street Journal has hinted at bubbles in both the Chinese stock market and the market for Bitcoin during the past month alone. But, financial economists are much more reluctant to call something a bubble. There’s debate about whether bubbles even exist. And, much of this debate revolves around whether it’s possible to predict the timing of the resulting crash. If bubbles really do exist, then it seems like there should be some theory of when they’re going to pop (Fama, 2016).

There’s a good reason why financial economists care so much about the timing of the crash: this is what matters most to traders. Put yourself in the shoes of a trader in mid August 1987. The DJIA has risen roughly 12% since the beginning of July. What you want to know is, “When’s this party going to end?” Should you get out now? Or, should you keep dancing for another few months? It would be really useful to have a theory that answered these questions. And, it would be super useful to know which variables help predict the timing of the crash.

But, here’s the thing: traders aren’t the only people who care about bubbles. And, the crash ain’t the only thing worth modeling. To illustrate, put yourself in the shoes of a market regulator in August 1987. You’re staring at the same data as before. But now, what you really want to know is, “Is this party going to end? Does it represent a bubble?” If it does, then it doesn’t matter to you when the crash happens. Black Monday or Black Thursday; October 1987 or May 1988; it’s all the same to you. The same number of people will be harmed in all cases.

There are good reasons to worry about the existence of a bubble even if you can’t predict the timing of the crash. What are these reasons? That’s the topic of today’s post.

A Simple Model

One way to think about a speculative bubble is as a kind of Ponzi scheme (e.g., see here). Here’s a simple model. Imagine a group of traders that tend to build enormous long positions whenever they enter the market—i.e., these traders each have excess demand. And, whenever they build a position, suppose that they hold this position for a limited period of time–e.g., six months or a year. Once this time is up, they cash out. A bubble starts when one of these traders enters the market and drives up the price a little bit with his excess demand. If the market doesn’t crash before this first trader’s time is up, then the resulting price increase attracts additional traders. So, when the first trader finally cashes out, two more traders take his place. If the market doesn’t crash before these two traders exit the market, then the further price increase caused by these two traders’ excess demand attracts four additional traders, and so on… Thus, the Nth round of a bubble contains 2^{N-1} traders.

Let \theta \in (0, \, 1] denote the probability that the market crashes during the Nth round. The probability that a bubble lasts exactly one round—i.e., that the bubble ends immediately—is \theta. The probability that a bubble lasts exactly two rounds is (1-\theta) \times \theta. The probability that a bubble lasts exactly three rounds is (1-\theta)^2 \times \theta. In general, we have that \mathrm{Pr}[N=n|\theta] = (1 - \theta)^{n-1} \times \theta. Thus, larger values of \theta imply that a bubble will crash sooner:

    \begin{equation*} \mathrm{E}[N|\theta] = {\textstyle \sum_{n=1}^\infty} \, (1-\theta)^{n-1} \times \theta = (1-\theta)/\theta \end{equation*}

The number of rounds in any given bubble episode represents a draw from a negative binomial distribution.

Regulator’s Viewpoint

Here’s the important thing from a regulator’s point of view: once it crashes, most traders involved in a bubble will have lost money. If the bubble immediately crashes, then the first trader will be its last. 1/1=100\% of all traders involved will have lost money. If the bubble collapses during the second wave of traders, then there will be three traders in total. And, after the crash, two of them will have lost money, which corresponds to 2/(1+2) \approx 67\% of all traders involved. If the bubble collapses during the third round, then there will be seven traders in total. Four of them will have lost money after all is said and done. So, casualty rate will be 4/(1+2+4) \approx 57\%. In general, if the bubble lasts N rounds, then after the bubble bursts a fraction

    \begin{equation*} \mathrm{F}[N] = 2^{N-1} \big/ \, \big({\textstyle \sum_{n=1}^N} \, 2^{n-1} \big) \end{equation*}

of all traders will have lost money.

It’s easy to see that \mathrm{F}[N] > 50\% for all N \in \{1, \, 2,\, 3, \ldots\}. The figure to the right presents one way of looking at it. It shows the fraction of traders that will have lost money after a bubble ends, \mathrm{F}[N] (y-axis), as a function of how long the bubble lasts, N (x-axis). The fraction of traders who wind up suffering losses asymptotes towards 50\% from above as N gets larger and larger, but it never quite gets there. Here’s another way to look at it. Notice that \sum_{n=1}^N 2^{n-1} = 2^N-1. In other words, we have that 1 + 2 = 4-1 and 1 + 2 + 4 = 8-1 and so on… Thus, the number of traders who will have lost money after a bubble pops, 2^{N-1}, is always a little more than half of all traders involved in the bubble, 2^N -1, regardless of how long the bubble episode lasts.

What I love about this example is that \mathrm{F}[N] > 50\% is true for all choices of N \geq 1. It’s a statement that holds pointwise. More than half of all traders will have been harmed by a bubble no matter how likely it is that the bubble ends next period. Changing \theta doesn’t matter. This is the sense in which a regulator cares about the likelihood of a bubble taking place but not the timing of the crash. If the regulator is trying to maximize overall well-being, then he wants to make sure this doubling process doesn’t get started in the first place. Why does he care when it ends? It’s going to be socially harmful no matter the timing.

Trader’s Perspective

In addition, this regulator-indifference result is perfectly consistent with the idea that traders care a lot about the timing of the crash. To make things simple, suppose that a trader will lose \mathdollar 1m if he belongs to the Nth and final round that experiences the crash. But, he will profit by \mathdollar 1m if he’s one of the (N-1) rounds who cash out before then. In this setting, each trader has expected profit given by:

    \begin{equation*} (1 - 2 \cdot \theta) \times \mathdollar 1m = (1-\theta) \times \mathdollar 1m + \theta \times (-\mathdollar 1m) \end{equation*}

Thus, entering the market and trying to ride the bubble only makes sense for a trader if \theta \in (0, \, 0.5)—i.e., if the probability of a market crash in the next round is less than 50\%. In order to profit from a bubble, you have to get out before the crash. So, traders clearly care about the timing of the crash. Whether \theta = 0.49 or \theta = 0.51 makes a big difference to them. It’s just that this difference doesn’t matter to a regulator.

Filed Under: Uncategorized

The Continuous Limit of Kyle (1985) Ends With A Bang

July 31, 2018 by Alex

Suppose you uncover good news about a stock’s fundamental value. When you start trading on this information, market makers will notice a spike in aggregate demand, infer that someone must have discovered good news, and adjust the stock’s price upward accordingly. How much will this price impact cut into your profits? Well, you could measure the damage by estimating the change in the stock’s price per 100 shares you buy. If the number is small, the asset’s liquid; if it’s big, it ain’t. Price impact = 1/liquidity.

Of course, if the stock you’re interested in is very illiquid, then maybe you should just make yourself less conspicuous by spreading out your order flow. You can always sacrifice immediacy to gain liquidity. It’s a simple enough idea. But, figuring out precisely how you should spread out your order flow is a hard problem because it introduces a feedback loop. When you spread out your order flow, market makers are less likely to notice a spike in aggregate demand, so your equilibrium price impact will be smaller. But, if your price impact is smaller, then you have less of an incentive to spread out your order flow in the first place.

Where does this feedback loop end? How does strategic trading affect market liquidity in equilibrium? Kyle (1985) provides a nice model that answers these questions. In the model, there’s a single informed agent who places market orders for a risky asset over the course of N \geq 1 auctions. And, a risk-neutral market maker sets the market-clearing price in each auction after observing a noisy version of the informed agent’s demand. Solving the model reveals precisely how the informed agent should optimally adjust his order flow from auction to auction, thereby maximizing his expected profits given the equilibrium price impact.

One of the things I really like about the original paper is its analysis of the continuous-time limit. It turns out that, as the number of auctions during a fixed unit of time tends to infinity, N \to \infty, the informed agent strategically adjusts his demand from auction to auction in a way that keeps the equilibrium price impact constant. This is surprising. In general, you’d expect your price impact at 2:00pm to depend on what’s happened during the previous hour because market makers learn from aggregate order flow. But, if you can trade infinitely often, then the model indicates that you will strategically trade in a way that offsets this learning. Obviously, we don’t think that high-frequency trading actually makes liquidity constant. This is just a really clever way of showing how important equilibrium feedback loops are.

While I really like this analysis, I also think it’s created a misconception about how the informed agent behaves in the model. A constant price impact does not imply that the market is stable… quite the opposite actually. A Kyle (1985) with a large number of auctions describes a market that ends with a lightning fast flurry of intense trading activity. When there are many auctions, N \gg 1, the informed agent trades smoothly and steadily until the final few auctions. Then, all hell breaks loose. This post illustrates why.

Structure

In the model, there’s a single informed agent who places market orders for a risky asset in N \geq 1 auctions that take place during a fixed time interval. Let \Delta t = \sfrac{1}{N} denote the time between auctions in minutes. For concreteness, I’m going to think about this time interval as 1:00-2:00pm. So, if N = 2, then \Delta t = 30 minutes and there are auctions at 1:30 and 2:00pm; whereas, if N = 4, then \Delta t = 15 minutes and auctions occur at 1:15, 1:30, 1:45, and 2:00pm. This risky asset has fundamental value v \sim \mathrm{Normal}(0, \, 1), and the informed agent knows v prior to the start of the first auction. Based on this information, he submits market orders of size \Delta x_n in each auction. So, x_n = \sum_{\check{n}=1}^n \Delta x_{\check{n}} represents his cumulative demand during the first n auctions.

The equilibrium price in each auction, p_n, is determined by a market maker after observing the aggregate order flow, which is the sum of both the informed agent’s demand and a random demand shock:

    \begin{equation*} \Delta a_n = \Delta x_n + \Delta u_n \qquad \text{where} \qquad \Delta u_n \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{Normal}(0,\! \sqrt{\Delta t}) \end{equation*}

What’s important here is that the market maker only observes \Delta a_n. He can’t separately observe \Delta x_n or \Delta u_n on its own. As a result, when there’s a lot of demand, he might suspect that the informed agent has uncovered good news, but he can’t be certain. The order flow could always just be due to random noise. Given the market maker’s pricing rule, let \pi_n = \sum_{\hat{n}=n}^N (v - p_{\hat{n}}) \cdot \Delta x_{\hat{n}} denote the informed agent’s future profit on all positions acquired at auctions \{n, \, \ldots, \, N\}.

An equilibrium consists of two sequences of functions, \mathsf{X} = \langle \mathrm{X}_1(\cdot), \, \ldots, \, \mathrm{X}_N(\cdot) \rangle and \mathsf{P} = \langle \mathrm{P}_1(\cdot), \, \ldots, \, \mathrm{P}_N(\cdot) \rangle. The first sequence defines the informed agent’s trading strategy, x_n = \mathrm{X}_n(p_1, \, \ldots, \, p_{n-1}, \, v). The second sequence defines the market maker’s pricing rule, p_n = \mathrm{P}_n(\Delta a_1, \, \ldots, \, \Delta a_n). And, we say that (\mathsf{X}^\star\!, \, \mathsf{P}^\star) is an equilibrium if the following two conditions hold. First, the informed agent’s trading strategy has to be profit maximizing. i.e., if you were to pick any other alternative trading strategy, \mathsf{X}^{\text{alt}}, that’s identical to \mathsf{X}^\star in the first (n-1) auctions, then it must be the case that:

    \begin{equation*} \mathrm{E}[ \, \pi_n(\mathsf{X}^\star\!,\,\mathsf{P}^\star) \mid p_1^\star, \, \ldots, \, p_{n-1}^\star, \, v \, ] \geq \mathrm{E}[ \, \pi_n(\mathsf{X}^\text{alt},\,\mathsf{P}^\star) \mid p_1^\star, \, \ldots, \, p_{n-1}^\star, \, v \, ] \end{equation*}

Second, the market maker’s pricing rule has to be efficient:

    \begin{equation*} p_n^\star = \mathrm{E}[ \, v \mid \Delta a_1^\star, \, \ldots, \, \Delta a_n^\star \, ] \qquad \text{where} \qquad \Delta a_n^\star = \Delta x_n^\star+ \Delta u_n^{\phantom{\star}} \end{equation*}

i.e., price must be equal to the conditional expectation of fundamental value given aggregate order flow.

Solution

Theorem 2 of Kyle (1985) gives the solution to this model. If you restrict yourself to only considering pricing rules of the form

    \begin{equation*} p_n = p_{n-1} + \lambda_n \cdot \Delta a_n \qquad \text{and} \qquad p_0 = \mathrm{E}[v] = 0 \end{equation*}

then there’s a unique equilibrium (\mathsf{X}^\star\!,\,\mathsf{P}^\star) given by

    \begin{align*} \Delta x_n^\star &= \beta_n^{\phantom{\star}}\! \cdot (v - p_{n-1}^\star) \cdot \Delta t \\ \Delta p_n^\star &= \lambda_n^{\phantom{\star}}\! \cdot (\Delta x_n^\star + \Delta u_n^{\phantom{\star}}) \\ \sigma_n^2 &= \mathrm{Var}[ \, v \mid \Delta x_1^\star + \Delta u_1^{\phantom{\star}}, \, \ldots, \, \Delta x_n^\star + \Delta u_n^{\phantom{\star}} \,\! ] \\ \mathrm{E}[ \, \pi_{n+1}^{\phantom{\star}} \mid p_1^\star, \, \ldots, \, p_n^\star, \, v \, ]  &= \alpha_n^{\phantom{\star}}\! \cdot (v - p_n^\star)^2 + \delta_n^{\phantom{\star}} \end{align*}

where \beta_n, \sigma_n^2, \lambda_n, \alpha_n, and \delta_n are the solution to the following system of difference equations

    \begin{align*} \beta_n \cdot \Delta t &= {\textstyle \frac{1}{2 \cdot \lambda_n} \times \left(\frac{1 - 2 \cdot \alpha_n \cdot \lambda_n}{1 - \alpha_n \cdot \lambda_n} \right)} \\ \sigma_n^2             &= \sigma_{n-1}^2 \cdot (1 -  \lambda_n \cdot [\beta_n \cdot \Delta t]) \\ \lambda_n              &= \sigma_n^2 \cdot \beta_n \\ \alpha_{n-1}           &= {\textstyle \frac{1}{4 \cdot \lambda_n} \times \left( \frac{1}{1 - \alpha_n \cdot \lambda_n}\right)} \\ \delta_{n-1}           &= \delta_n + \alpha_n \cdot \lambda_n^2 \cdot \Delta t \end{align*}

under the conditions p_0 = \alpha_N = \delta_N = 0, \sigma_0^2 = 1, and \lambda_n \cdot (1 - \alpha_n \cdot \lambda_n) > 0.

On the right, I’ve plotted these constants for different Ns. You can see how the equilibrium values change as the number of auctions increases by moving the slider at the top. To verify consistency, note that when there are N=4 auctions, the values of \lambda_n and \sigma_n^2 to the right are the same as those depicted by the four \square \, \square \, \square \, \squares in Figure 1 of Kyle (1985).

N→∞ Limit

What’s more, by pushing the slider all the way to the right so that N=60 and auctions occur every \Delta t = 1 minute, you get something close to the continuous-limit result I described in the introduction. As N \to \infty, the price-impact coefficient \lambda_n \to 1 due to the way that the informed agent spreads out his order flow across auctions. But, does this mean that informed demand is smooth?

No.

You can see as much in the animation to the right. The top panel shows realizations of the informed agent’s trading volume, |\Delta x_n|. As you push the slider towards N = 60 in this figure, you can watch the informed agent’s demand fluctuate more and more as he approaches the last 2:00pm auction. He’s spreading out his demand, but his demand’s clearly not smooth. When N is large, the market ends with a short intense burst of trading activity. In fact, you might even think about this short intense burst of activity as a tell-tale sign of short-horizon trading.

Here’s another way of looking at what’s happening. The noise shocks are the same regardless of which auction they arrive in, \Delta u_n \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{Normal}(0,\! \sqrt{\Delta t}). Noise doesn’t care whether it’s auction n=1 or auction n=60. So, the typical noise shock will always be on the order of \sqrt{\Delta t}. As a result, the typical change in the equilibrium price in auction (n-1) due to demand noise will be \lambda_{n-1} \cdot \! \sqrt{\Delta t}. And, this random price change will, in turn, change the informed agent’s demand in auction n since \Delta x_n = \beta_n \cdot (v - p_{n-1}) \cdot \Delta t:

    \begin{equation*} \mu_n = \beta_n \cdot (\lambda_{n-1} \cdot \! \sqrt{\Delta t}) \cdot \Delta t \end{equation*}

By plugging in the equilibrium conditions from the previous section, we can rewrite the typical change in the informed agent’s demand due to random fluctuations in the previous auction as follows:

    \begin{align*} \mu_n &=  {\textstyle \frac{\lambda_{n-1}}{2 \cdot \lambda_n} \cdot \left(\frac{1 - 2 \cdot \alpha_n \cdot \lambda_n}{1 - \alpha_n \cdot \lambda_n} \right)} \times \! \sqrt{\Delta t} \\ &=  2 \cdot \alpha_{n-1} \cdot \lambda_{n-1} \cdot (1 - 2 \cdot \alpha_n \cdot \lambda_n) \times \! \sqrt{\Delta t} \end{align*}

The bottom panel in the figure to the right plots the quantity. When N = 60, the informed agent responds more and more aggressively to noise shocks in the previous auction as n \to 60. This behavior corresponds to the hyperbolic growth in \beta_n as n \to 60 plotted above. Constant price impact does not imply smooth trading.

Filed Under: Uncategorized

Empirical Bayes and Price Signals

April 27, 2018 by Alex

Asset-pricing models are built upon the idea that traders learn from price signals. For example, suppose there are N \geq 1 actively managed mutual funds. And, imagine a trader that observes the entire cross-section of these mutual funds’ returns in month t:

    \begin{equation*} R_{n,t} = \alpha_n + \epsilon_{n,t} \qquad \text{where} \qquad \epsilon_{n,t} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(0, \, \sigma_{\epsilon}^2) \end{equation*}

In the equation above, \alpha_n is the average performance of the nth active mutual-fund manager while \epsilon_{n,t} is measurement error in price signals. A skilled mutual-fund manager has an \alpha_n > 0. So, after observing cross-section of mutual funds’ returns in a given month, a trader can use Bayes’ rule

    \begin{equation*} \mathrm{Pr}[\alpha_n > 0|R_{n,t}] = {\textstyle \left( \frac{\mathrm{Pr}[R_{n,t}|\alpha_n > 0]}{\mathrm{Pr}[R_{n,t}]} \right)} \times \mathrm{Pr}[\alpha_n > 0] \end{equation*}

to update his beliefs about whether or not the nth active mutual-fund manager is skilled.

At first glance, the logic above seems trivial. But, on closer inspection, there’s something a bit paradoxical about framing a trader’s inference problem this way. If a trader wants to use Bayes’ rule to learn about a particular fund manager’s skill level from realized returns, then it seems like the trader needs to know how skill is distributed across the population of fund managers. After all, the last term in the equation above is just one minus the cumulative-distribution function at zero, \mathrm{Pr}[\alpha_n > 0] = 1 - \mathrm{CDF}_{\alpha}(0). And, financial economists disagree about basic properties of this distribution. For instance, there is debate about whether any active mutual-fund managers are skilled—i.e., about whether \mathrm{Pr}[\alpha_n > 0] = 0 or \mathrm{Pr}[\alpha_n > 0] > 0. If we can’t agree about these sorts of basic facts, then are traders supposed to apply Bayes’ rule?

This is where the empirical-Bayes method makes an appearance. It turns out that, in the example above, a trader can learn about a particular mutual-fund manager’s skill from realized returns without having any ex ante knowledge about how skill is distributed across the population of fund managers. He can just estimate this prior distribution from the data. And, this post illustrates how using a trick known as Tweedie’s formula.

Simple Example

Let’s start with a simple example to illustrate how the empirical-Bayes method works. Suppose that fund-manager skill is normally distributed across the population:

    \begin{equation*} \alpha_n \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(\mu_{\alpha}, \, \sigma_{\alpha}^2) \end{equation*}

In this setup, it’s easy to compute a trader’s posterior beliefs about the skill of the nth mutual-fund manager after observing this manager’s month-t returns:

(1)   \begin{equation*} \mathrm{E}[\alpha_n|R_{n,t}] = {\textstyle \left( \frac{\sigma_{\alpha}^2}{\sigma_{\alpha}^2 + \sigma_{\epsilon}^2}\right)} \times R_{n,t} + {\textstyle \left( \frac{\sigma_{\epsilon}^2}{\sigma_{\alpha}^2 + \sigma_{\epsilon}^2} \right)} \times \mu_\alpha \end{equation*}

This is a completely standard Gaussian-learning problem (e.g., see here, here, here, etc…).

The formula in Equation (1) seems to require knowledge of the mean and variance of the skill distribution, \mu_{\alpha} and \sigma_{\alpha}^2. But, not so. Notice that when both skill and error are normally distributed, realized returns are also normally distributed, R_{n,t} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(\mu_R, \, \sigma_R^2), with

    \begin{equation*} \begin{split} \mu_R &= \mu_{\alpha} \\ \sigma_R^2 &= \sigma_{\alpha}^2 + \sigma_{\epsilon}^2 \end{split} \end{equation*}

So, a trader could form the correct ex-post beliefs about the skill of nth mutual-fund manager by simply estimating the cross-sectional mean and variance of the realized returns

(2)   \begin{equation*} \mathrm{E}[\alpha_n|R_{n,t}] = {\textstyle \left( \frac{\sigma_R^2 - \sigma_{\epsilon}^2}{\sigma_R^2} \right)} \times R_{n,t} + {\textstyle \left( \frac{\sigma_{\epsilon}^2}{\sigma_R^2} \right)} \times \mu_R \end{equation*}

since \sfrac{\sigma_{\alpha}^2}{(\sigma_{\alpha}^2 + \sigma_{\epsilon}^2)} = \sfrac{(\sigma_R^2 - \sigma_{\epsilon}^2)}{\sigma_R^2} and \sfrac{\sigma_{\epsilon}^2}{(\sigma_{\alpha}^2 + \sigma_{\epsilon}^2)} \times \mu_{\alpha} = \sfrac{\sigma_{\epsilon}^2}{\sigma_R^2} \times \mu_R.

This is the essence of the empirical-Bayes method. If you’re interested in learning from a specific observation and you don’t know which priors to use, then just use the remaining data to estimate these priors. i.e., replace \mu_R and \sigma_R^2 with \hat{\mu}_R = \frac{1}{N-1} \cdot \sum_{n' \neq n} R_{n',t} and \hat{\sigma}_R^2 = \frac{1}{N-2} \cdot \sum_{n' \neq n} (R_{n',t} - \hat{\mu}_R)^2 in Equation (2).

The figure above illustrates how this scheme works. The three left panels show the cross-sectional distributions of measurement error, manager skill, and realized returns under the assumption of normality. The right panel then shows a trader’s posterior beliefs about the skill of the nth mutual-fund manager (y-axis) after observing this fund’s realized returns in month t (x-axis). The purple line shows \mathrm{E}[\alpha_n|R_n] calculated using knowledge of both \mu_{\alpha} and \sigma_{\alpha}^2. The dashed black line shows \mathrm{E}[\alpha_n|R_n] calculated via the empirical-Bayes method using estimates of \hat{\mu}_R and \hat{\sigma}_R^2 from the cross-sectional distribution of returns.

Tweedie’s Formula

Tweedie’s formula is a natural extension of this approach that doesn’t require manager skill (or whatever it is that traders are trying to learn about) to be normally distributed. Here’s the idea. Notice that in the normally-distributed case, R_{n,t} \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{N}(\mu_R, \, \sigma_R^2), the probability-density function (PDF) of realized returns is given by:

    \begin{equation*} \mathrm{f}(R) = {\textstyle \frac{1}{\sqrt{2 \cdot \pi \cdot \sigma_R^2}}} \cdot \exp {\textstyle \left\{- \, \frac{1}{2 \cdot \sigma_R^2} \cdot (R-\mu_R)^2 \right\}} \end{equation*}

And, if we define the log of this PDF, \ell(R) = \log \mathrm{f}(R), then \ell'(R) = - \, (\sfrac{1\!}{\sigma_R^2}) \cdot (R - \mu_R). So, we can write the formula for a trader’s posterior beliefs in Equation (2) as follows:

(3)   \begin{equation*} \mathrm{E}[\alpha_n|R_n]  =  R_n + \sigma_{\epsilon}^2 \cdot \ell'(R_n) \end{equation*}

This is Tweedie’s formula. And, in keeping with Stigler’s law, it was Robbins (1956) who showed that Tweedie’s formula holds approximately for any prior distribution on \alpha_n that satisfies standard regularity conditions, such as being smooth and having a single peak. The formula in Equation (3) is interesting because it means that, if a trader can approximate the cross-sectional distribution of mutual-fund returns (i.e., estimate \hat{\mathrm{f}}(R)), then he can appropriately update his beliefs about any particular manager’s skill level (i.e., compute \hat{\mathrm{E}}[\alpha|R_{n,t}]). There’s no need for him to take a hard-line dogmatic stance about what the cross-sectional distribution of mutual-fund manager skill looks like.

To see this point in action, check out the figure above. First, click on the “Normal” button. This version of the figure replicates the earlier result by estimating \mathrm{f}(R) with a 4th-order polynomial rather than by directly estimating \hat{\mu}_R and \hat{\sigma}_R^2. The interesting part, however, is that this result also holds when mutual-fund manager skill is not normally distributed. For example, suppose that skill obeys a Laplace distribution:

    \begin{equation*} \alpha_n \overset{\scriptscriptstyle \text{iid}}{\sim} \mathrm{Lap}(\lambda_{\alpha}/\sigma_{\epsilon}) \qquad \text{where} \qquad \mathrm{Lap}(\theta) = (\sfrac{\theta\!}{2}) \cdot e^{- \theta \cdot |x|} \end{equation*}

Under this assumption, the correct way for a trader to update his prior beliefs about the nth manager’s skill after observing the manager’s realized return in month t is to use a threshold rule. When the manager’s return is sufficiently small, |R_{n,t}| \leq \sigma_{\epsilon} \cdot \lambda_{\alpha}, a trader should not update his beliefs at all:

    \begin{equation*} \mathrm{E}[\alpha_n|R_n]  =  \begin{cases} \mathrm{Sgn}(R_n) \cdot (|R_n| - \sigma_{\epsilon} \cdot \lambda_{\alpha}) &\text{if } |R_n| > \sigma_{\epsilon} \cdot \lambda_{\alpha} \\ 0 &\text{otherwise} \end{cases} \end{equation*}

This is the Bayesian LASSO. And, by clicking on the “Laplace” button in the figure above, you can see how Tweedie’s formula captures this non-responsiveness without having to directly assume that traders are using an \ell_1 penalty. Something resembling a soft-thresholding rule just emerges from the data.

Actual Data

Finally, click on the “???????” button. In the lower left-hand corner, you should now see the distribution of returns for all actively managed equity mutual funds in May 2012 (normalized to be on the same scale as the data from the earlier simulations). The data in this version of the figure comes from WRDS. I just picked one month at random. The dashed line is the estimated PDF for this return distribution, which I again computed using a 4th-order polynomial (see CASI, Ch. 15). There is nothing in the middle box because I don’t know the skill level of each mutual-fund manager. In the upper-left box, I’ve plotted the PDF of the measurement error. But, I didn’t plot a histogram of realized errors because, again, I can’t tell skill from luck. I can only see the cross-section of returns.

There are two interesting things about the plot of the posterior beliefs on the right. The first is that, if you apply Tweedie’s formula to actual mutual-fund returns, then you get a picture that looks a lot like the picture that emerged using Laplace priors. In other words, it looks a lot like a world where the distribution of active mutual-fund manager skill has fat tails—i.e., a world where there are a couple of very skilled managers and a couple of utterly incompetent managers and everyone else is just sort of ‘meh’. The second interesting thing about this picture is that making prices less informative (i.e., increasing \sigma_{\epsilon}^2) affects traders’ posterior beliefs in a highly non-linear way. Put differently, when prices are less informative, traders don’t just react less to all price signals. They just stop reacting to small price changes. This is not a result that you could get in an information-based asset-pricing model with strictly normal shocks.

Filed Under: Uncategorized

How Bad Are False Positives, Really?

January 9, 2018 by Alex

Imagine you’re looking for variables that predict the cross-section of expected returns. No search process is perfect. As you work, you will inevitably uncover both tradable anomalies as well as spurious correlations. To figure out which are which, you regress returns on each variable that you come across:

    \begin{equation*}  r_n = \hat{\alpha} + \hat{\beta} \cdot x_n + \hat{\epsilon}_n \end{equation*}

This is helpful because “any predictive regression can be expressed as a portfolio sort” and vice versa. So, a statistically significant \hat{\beta} suggests a profitable stock-picking strategy.

But, what qualifies as a “statistically significant” test result? If a variable doesn’t actually predict returns, then the probability that its \hat{\beta} will have a t-stat greater than 1.96 is 5\% by definition:

    \begin{equation*} \mathrm{Pr}\big( \, \mathrm{t}(\hat{\beta}) > 1.96 \, \big| \, \text{variable is spurious} \, \big) = 0.05 \end{equation*}

But, what if you didn’t just consider one variable on its own? Instead, suppose that you ran K \gg 1 separate regressions. If all K variables were just spurious correlations, the probability that at least one of these \hat{\beta}s has a t-stat greater than 1.96 would be much larger than 5\%:

    \begin{equation*} \mathrm{Pr}\big( \, \max\{ \mathrm{t}(\hat{\beta}_1), \, \mathrm{t}(\hat{\beta}_2), \, \ldots, \, \mathrm{t}(\hat{\beta}_K) \} > 1.96 \, \big| \, \text{all $K$ variables are spurious} \, \big) = 1 - (1 - 0.05)^K > 0.05 \end{equation*}

Finding a \mathrm{t}(\hat{\beta}_k) > 1.96 becomes meaningless as you run more and more regressions. e.g., if K = 10, then you should expect to see a t-stat larger than 1.96 more than 1 - (1 - 0.05)^{10} \approx 40\% of the time.

When people in academic finance talk about the problem of “data mining”, this is what they’re referring to. It seems patently obvious that having such a high false-positive rate is a bad thing. And, at first glance, it seems like there’s an easy way to fix the problem: just use a larger cutoff for statistical significance. e.g., researchers have suggested using a t-stat greater than 3.00 rather than 1.96 to account for the fact that we’ve proposed thousands of candidate variables. But, is our obsession with minimizing the false-positive rate really the right approach? Do we always want to choose our statistical tests so that they have the lowest possible false-positive rate? Not necessarily. And, this post describes two reasons why.

Reason #1

We don’t care about the false-positive rate for its own sake. What we really want to know is: “Conditional on observing a significant test result, how likely is it that we’ve found an honest-to-goodness anomaly?” Using Bayes’ theorem, we can write this conditional probability as

    \begin{equation*} \mathrm{Pr}(\text{anomaly} \, | \, \text{signif}) = \frac{ \mathrm{Pr}( \text{signif} \, | \, \text{anomaly} ) \cdot \mathrm{Pr}(\text{anomaly}) }{ \mathrm{Pr}( \text{signif} \, | \, \text{anomaly} ) \cdot \mathrm{Pr}(\text{anomaly}) + \mathrm{Pr}( \text{signif} \, | \, \text{spurious} ) \cdot \mathrm{Pr}(\text{spurious}) } \end{equation*}

Clearly, if we underestimate the false-positive rate, \mathrm{Pr}(\text{signif} \, | \, \text{spurious}), then we’re going to overestimate this conditional probability because we’re going to be dividing by a smaller number on the right-hand side.

But, \mathrm{Pr}( \text{signif} \, | \, \text{spurious} ) isn’t the only term on the right-hand side of the equation! We care about more than just the false-positive rate when updating our priors. e.g., if we knew there were never any anomalies, then we could guarantee that every single significant result was a false positive. So, we would always conclude that \mathrm{Pr}(\text{anomaly} \, | \, \text{signif}) = 0 regardless of how much we underestimated the false-positive rate.

Let’s sharpen this insight with a little algebra. First, suppose that the unconditional probability of finding a tradable anomaly is \mu \in [0, \, \sfrac{1}{2}):

    \begin{equation*} \mathrm{Pr}(\text{anomaly}) = 1 - \mathrm{Pr}(\text{spurious}) = \mu \end{equation*}

Next, suppose that the probability of observing a significant test result for a spurious correlation is (5\% + \vartheta) for \vartheta \geq 0 while the probability of observing a significant test result for a tradable anomaly is 100\%:

    \begin{equation*} \begin{split} \mathrm{Pr}( \text{signif} \, | \, \text{spurious} ) &= 0.05 + \vartheta \\ \mathrm{Pr}( \text{signif} \, | \, \text{anomaly} ) &= 1 \end{split} \end{equation*}

Thus, \mu represents the base rate of observing anomalies, and \vartheta represents the additional false-positive rate introduced by the data-mining problem described above. Roughly speaking, a larger \mu means that anomalies are more common. And, a large \vartheta means that regressions are easier to run.

We can express our posterior beliefs that a particular variable represents a tradable anomaly given a significant test result as

    \begin{equation*} \underset{=\mathrm{Lik}(\mu, \, \vartheta)}{\mathrm{Pr}( \text{anomaly} \, | \, \text{signif} )} = \frac{ \mu }{ \mu + (0.05 + \vartheta) \cdot (1 - \mu) } \end{equation*}

Thus, ignoring the additional false positives introduced by data mining biases our posterior beliefs by

    \begin{equation*} \mathrm{Bias}_{\vartheta}(\mu) = \mathrm{Lik}(\mu, \, 0) - \mathrm{Lik}(\mu, \, \vartheta) \end{equation*}

The figure to the right plots this bias (y-axis: \mathrm{Bias}_{\vartheta}(\mu)) as a function of the excess false-positive rate (x-axis: \vartheta). The line is always sloping upward because the more you underestimate a test’s false-positive rate the more confident you will be that you’ve found an anomaly. However, the shape of the line dramatically changes as you play around with the slider, which adjusts \mu. When 0.05 < \mu < 0.12, the plot has more or less the same upward-sloping concave shape. But, when \mu < 0.01, the shape of the plot flattens out dramatically. In other words, if the base rate is sufficiently small, then underestimating the false-positive rate doesn’t affect our posterior beliefs very much.

This observation implies something a little counterintuitive: a paper can’t simultaneously argue that A) almost all documented anomalies are in fact spurious correlations, and that B) it’s super important for other researchers to use a test procedure that they’ve proposed which minimizes the false-positive rate. Although they get made one after the other (e.g., here), these two claims aren’t internally consistent. It’s one or the other. Minimizing the false-positive rate can only matter if there’s a non-negligible chance of finding a tradable anomaly.

Reason #2

If you’re headed to the doctor’s office for a pregnancy test, then false positives matter. Finding out you’re pregnant is a big deal. Later discovering that it was a mistake would be traumatic. But, testing for Coeliac disease is different. If you have the disease, then you really want to know. But, treating the disease only involves changing your diet. There’s no need to undergo risky surgery or take expensive medication. So, when testing for Coeliac disease, false positives aren’t such a big deal (unless you looooove bread). And, if given the choice, your doctor should choose a test for the disease that has the lowest false-negative rate, even if that means asking a few perfectly healthy patients to cut gluten out of their diets.

The same sort of logic applies to testing for tradable anomalies. If you can trade on a statistically significant anomaly using liquid actively-traded stocks, then why spend time worrying about the false-positive rate. If you find out you’re wrong, then you can quickly and painlessly exit the position. If this is the sort of world you’re operating in, then you might actually want to set up your statistical tests to minimize your false-negative rate. This is one way to interpret pithy trader sayings like “invest first, investigate later”.

The medical literature also gives a nice way of formalizing this idea using something called the number needed to treat (e.g., see here). Suppose I came to you with a bunch of variables that each seemed to predict the cross-section of expected returns. They each delivered significant excess returns in backtesting. If you choose S \geq 1 of these variables

    \begin{equation*} S = \frac{1}{\mathrm{Pr}(\text{anomaly} \, | \, \text{signif}) - \mathrm{Pr}(\text{anomaly})} \end{equation*}

then you should expect your selections to contain one more tradable anomaly than if you had just picked S variables at random—i.e., regardless of whether they had delivered significant excess returns in backtesting.

Now, think about a portfolio that invests the same amount of money in strategies based on each of the S candidate variables you choose. This portfolio’s expected return will depend on both the profitability of your one extra tradable anomaly and the losses of your (S-1) other spurious predictors:

    \begin{equation*} {\textstyle \left(\frac{1}{S}\right)} \cdot \mathrm{E}[\sfrac{\text{profit}}{\text{$\mathdollar 1$ invested in anomaly}}]  -  {\textstyle \left(\frac{S-1}{S}\right)} \cdot \mathrm{E}[\sfrac{\text{loss}}{\text{$\mathdollar 1$ invested in spurious correlation}}] \end{equation*}

Clearly, a higher false-positive rate means a larger S. But, the formulation above illustrates why this might not be such a bad thing. If trading on your one genuine anomaly is really profitable and you can quickly identify/exit your remaining (S-1) spurious positions, then who cares if S is large?

Filed Under: Uncategorized

« Previous Page
Next Page »

Pages

  • Publications
  • Working Papers
  • Curriculum Vitae
  • Notebook
  • Courses

Copyright © 2026 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in