The filter for bell curves
When the state moves in a straight-line way and all noise is bell-shaped, something nice happens: the belief about the state stays a bell curve forever. A bell curve needs only two numbers, its mean and its variance , so a filter has to carry just those two. This is the Kalman filter, and it is the exact answer in this setting. Each day it does two steps. Predict: the mean stays, the variance grows by . Update: the observation pulls the mean toward itself by a fraction , called the gain, and the variance shrinks.
The update is just a weighted average: the new mean is . The gain lies between and . It is close to when the prediction is very uncertain (large ) or the observation is precise (small ), so you trust the data. It is close to in the opposite case, so you trust the prediction. The difference is the surprise, called the innovation. Every update shrinks the variance, because , while every prediction grows it by . Run long enough and the two balance at a steady level.
The same filter tracks a time-varying beta. The state is the beta , which drifts like a random walk, and the observation is a stock's return , where is the market return. The only change is that the gain becomes : a big market move teaches a lot about beta, a day with teaches almost nothing. On Apple against SPY since 2005, the full-sample beta is , while a Kalman filter with puts it at at the end of 2008, at the end of 2018 and on the last day, with a standard error of about .
- Two numbers per day: a mean and a variance are enough when everything is linear and bell-shaped.
- The gain is a trust dial: near trusts the new data, near trusts the prediction.
- Limits: if the volatility itself is hidden or the noise has fat tails, the belief is no longer a bell curve and we need particles.
Lab · what's graded
- The first gain15 pts
- The updated mean15 pts
- The updated variance10 pts
- Day two15 pts
- The steady level10 pts
- A noisier observation10 pts
- Match the vocabulary10 pts
- Why an update shrinks the variance15 pts