Pair Trading Lab Helpdesk & Forum

Pair Trading => Models, Algorithms & Approaches => Topic started by: Robin Park on July 27, 2013, 09:01:16 pm

Title: Z-Score, Standard Deviation, and Variance
Post by: Robin Park on July 27, 2013, 09:01:16 pm
How did you compute the Z-score, Standard Deviation, and Variance? I tried using the ratio of my two stocks and the past 15 day average of my sample data, but my results are different. Thanks
Title: Re: Z-Score, Standard Deviation, and Variance
Post by: admin on July 28, 2013, 07:54:40 am
Hello Robin,

in Ratio model, we calculate ratio series of two stock price series (Ri = Xi/Yi). Standard deviation is calculated using N last Ri values - let's call it Si.

We also calculate moving average series of Ri - let's call it Mi. Then we calculate spread series Di = Ri-Mi. We call it "delta" and you can see it in ratio model backtest charts.

Z-score Zi is then calculated as Zi = Di/Si.