Pair Trading > Models, Algorithms & Approaches

Z-Score, Standard Deviation, and Variance

(1/1)

Robin Park:
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

admin:
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.

Navigation

[0] Message Index

Go to full version