STOCKS & COMMODITIES magazine. The Traders' Magazine

Register or Log In — Traders.com and STOCKS & COMMODITIES magazine

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

NOT A SUBSCRIBER?

To continue reading, sign-up for trial access to Traders.com and the S&C Archive37,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.



DEPARTMENTS: Advertising | Editorial | Circulation | Contact Us | BY PHONE: (206) 938-0570

PTSK — The Professional Traders' Starter Kit
Home — S&C Magazine | Working Money Magazine | Traders.com Advantage | Online Store | Traders’ Resource
Add a Product to Traders’ Resource | Message Boards | Subscribe/Renew | Free Trial Issue | Article Code | Search

Copyright © 1982–2024 Technical Analysis, Inc. All rights reserved. Read our disclaimer & privacy statement.