Pair Trading Lab Helpdesk & Forum
Pair Trading => Models, Algorithms & Approaches => Topic started 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
-
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.