Author Topic: Z-Score, Standard Deviation, and Variance  (Read 5617 times)

Robin Park

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Z-Score, Standard Deviation, and Variance
« 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

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Z-Score, Standard Deviation, and Variance
« Reply #1 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.