[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correlation



PureBytes Links

Trading Reference Links

Paul:

>What data do I enter into the [correlation] formula, which compares
>two identically-sized arrays of values?  I figure I'll have two
>arrays of data, each 252 days long.  But if I take the % return:
>over what period of time should the % return be calculated (daily?,
>weekly?, monthly?).

What's your time horizon for trading?  Daytrading?  Long term
trading?  That will determine what period of time to use.  For
daytrading you may want to use half-hour intervals, for buy-and-hold
trading you may want to use weekly intervals or more.

Personally I would use price movements (change in price) not the
prices themselves.  You don't have to convert them to percentages.

Try it.  Make an array of random numbers.  Make another array of the
same random numbers multiplied by some constant.  Now both arrays
have different "price" levels, but they are both changing by the
same percentage.  The correlation between the two arrays will always
be 1.0 no matter how you scale the second array.  If the arrays
represent changes in price, then the two markets are correlated.

Be sure not to ignore negative correlations.  A correlation of +0.92
is just as significant as a correlation of -0.92.  If you would buy
the first stock, then you'd want to short the second, and vice versa.

-- 
  ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
 // +__>   Director of Research and Development
 //  \ 
 //___)    Unicorn Research Corporation -- http://unicorn.us.com