Jumat, 08 Juni 2007

The Many Facets Of Linear Regression

Many years ago, a portfolio managing director asked me inwards a telephone interview: "Do you lot believe that linear or nonlinear models are to a greater extent than powerful inwards edifice trading models?" Being a babe-in-the-woods, I did non hesitate inwards answering "Nonlinear!" Little did I know that this is the inquiry that dissever the men from the boys inwards the realm of quantitative trading. Subsequent experiences showed me that nonlinear models accept mostly been unmitigated disasters inwards terms of trading profits. As Max Dama said inwards a recent first-class article on linear regression: "...when the signal to racket ratio is .05:1, ... there’s non much betoken inwards worrying nearly [higher gild effects]". One is almost sure enough to overfit a nonlinear model to non-recurring noise.


Until recently, I accept used linear regression mainly inwards finding hedge ratios betwixt ii instruments inwards couplet trading, or to a greater extent than to a greater extent oft than non inwards finding the weightings (in publish of shares) of private stocks inwards a handbasket inwards closed to shape of index arbitrage. Of course, others accept found linear algebra useful inwards principal ingredient analysis in addition to to a greater extent than to a greater extent oft than non cistron analysis every bit well. But cheers to a publish of commenters on this weblog every bit good every bit diverse private correspondents, I accept begun to apply linear regression to a greater extent than straight inwards trading models.


One way to straight apply linear regression to trading is to piece of occupation it inwards house of moving averages. Using moving average implicitly assumes that at that topographic point is no tendency inwards a cost series, that the hateful of the prices volition rest the same. This of class may non live on true. So using linear regression to projection the electrical flow equilibrium cost is sometimes to a greater extent than accurate than simply setting it equal to a moving average. I accept found that inwards closed to cases, this equilibrium cost results inwards improve mean-reverting models: e.g. curt an musical instrument when its electrical flow cost is way to a higher house the equilibrium price. Of course, 1 tin strength out too piece of occupation linear regression inwards a similar way inwards momentum models: e.g. if the electrical flow cost is way to a higher house the equilibrium price, take in this a "breakout" in addition to purchase the instrument. 


Max inwards his article referenced to a higher house too pointed out a to a greater extent than sophisticated version of linear regression, normally called "weighted to the lowest degree squares regression" (WLS). WLS is to linear regression what exponential moving average (EMA) is to elementary moving average (SMA): it gives to a greater extent than weights to recent information points. Indeed I accept found that EMA oft gives improve results than SMA inwards trading. However, in addition to thence far I accept non found WLS to live on improve than elementary to the lowest degree squares. Max too referenced an article which establishes the equivalence betwixt weighted to the lowest degree squares in addition to Kalman filter. Now Kalman filter is a linear model that is really pop with quantitative traders. The squeamish characteristic nearly Kalman filter is that at that topographic point is really few gratis parameters: the model volition conform itself to the agency in addition to covariances of the input fourth dimension serial gradually. And furthermore, it tin strength out exercise in addition to thence one-step at a time (or inwards technical jargon, using an "online" algorithm) : i.e., at that topographic point is no demand to dissever the information into "training" in addition to "test" sets, in addition to no demand to define a "lookback" menses dissimilar moving averages. It makes piece of occupation of "hidden states" much similar Hidden Markov Models (HHM), but dissimilar HHM, Kalman filter is faithfully linear.


I haven't used Kalman filter much myself, but I would welcome whatsoever comments from our readers on its usage. Also, if you lot know of other ways to piece of occupation linear regression inwards trading, exercise part with us here!



Tidak ada komentar:

Posting Komentar