Quantitative Methods | JAN 2010
Predicting Market Data Using The Kalman Filter by R. Martinelli & N. Rhoads
Predicting Market Data Using The Kalman Filter by R. Martinelli & N. Rhoads The Kalman filter is a two-stage algorithm that assumes there is a smooth trendline within the data that represents the true value of the market before being perturbed by market noise. Can this filter be used to forecast stock price movements? Figure 1 shows daily opens for one year (252 days) of Ford Motor Co. (F). According to modern financial engineering principles, market data such as this is considered to be Brownian motion, which means that the daily price changes form a white-noise process. White noise is a random process in which consecutive values are independent of each other, among other things, which means that each day, a price increase is just as likely as a decrease. In reality, it is not uncommon for a particular market item to have several consecutive down days or up days over a short time span. During such times, the prices are said to be correlated. The objective is to harness these correlations with a Kalman filter so you can forecast price movements. In a 2006 article for Stocks & Commodities, a simple linear extrapolation was employed to predict tomorrow’s price change. The prediction was then used to calculate the alpha statistic, which compares the predicted price change to a recent average of price changes. Relatively large, positive values of alpha indicate a long position, and relatively large negative values indicate a short one. This procedure was backtested on a random selection of stocks and indexes to test its effectiveness. The indicated positions were taken, closed out the next trading day, and all profits and losses were accumulated in a chart called the Fortune. Surprisingly, of the 28 items tested, 20 produced greater profits than a simple buy & hold position for the same time period. In this article, we will expand on the previous work, replacing the simple one-day predictor with a Kalman filter. The Kalman, as applied here, is a two-stage algorithm that assumes there is a smooth trendline within the data that represents the true value of the market item before being perturbed by market noise. In the first stage, a few previous trendline values are fit to a suitable model. It is then extrapolated to the next time value to generate a prediction and its error variance.
by R. Martinelli & N. Rhoads
Technical Analysis of STOCKS & COMMODITIES
The Traders’ Magazine since 1982
has had over 1,226,237 subscribers from 174 different countries.
37,000 Page Traders’ Archive for $89.99
To continue reading, sign-up for trial access to Traders.com and the S&C Archive — 37,000 pages of trading ideas!
After verifying your email address, you will have limited access to the S&C Archive, as well as access to a Digital Edition of S&C, and access to Traders.com Advantage and Working Money for 30 days.
Not a subscriber to Technical Analysis of
STOCKS & COMMODITIES magazine?
Click
here to subscribe, or request
a trial subscription.
Log-in now to view articles from the S&C Archive.
Your Subscriber ID is located at the top of your magazine label, highlighted here in red.
Your last name can be found on the second line, highlighted here in blue.
*If you have a company name on the label, that can also be used. It will appear below your name on the label.
If you do not have a Subscriber ID on your label, you can find it on your statement or renewal form.
For help locating your Subscriber ID number, please call us at 1-800-832-4642 or send an email to Survey@Traders.com. If sending an email, please include your name and mailing address.