Predicting Market Data Using The Kalman Filter, Pt 2 by R. Martinelli & N. Rhoads
Can the Kalman filter be used to predict future price movement? In this second part of this series we answer this question.
Previously, we discussed the Kalman filter and the alpha indicator. This time, we study the accumulation of profit/loss through the fortune chart. We also backtest the filter and analyze the results. The profit/loss on day k may be written as:
Pk = A Wk (yk/yk-1 – 1)
where the quantity in parentheses is the relative price-change, or return, on day k, A is the trade amount in dollars, and Wk = 1 if αk > C, Wk = -1 if αk < -C and Wk = zero otherwise (W for wager). Note that Wk = 0 corresponds to no trade on day k and so Pk = zero as well. Further, note that A is the same for every trade. For the Ford data, C was found to be 0.38, and Figure 1 shows its Pk values, where the trade amount A was set to $1.00 (zero values are not shown). The red point at November 28, 2008, represents the trade having the largest profit. The reason for the large profit can be seen in Figure 2, Part 1, where the red point in Figure 1 corresponds to point 8 in Figure 2. The prediction of 1.84 was nowhere near the actual at 2.47, but it was in the correct direction, up from 1.72, resulting in a 0.436 profit.