Pair Trading Lab Helpdesk & Forum
Pair Trading => Models, Algorithms & Approaches => Topic started by: marcantony foreman on October 13, 2021, 06:04:27 am

Hello, does the standard deviation moving average match the moving average of the ratio?
For example if I select EMA for the ratio, does the standard deviation use the EMA as well or does it use SMA for that caclulation.
Thanks

From the documentation of ratio model:
* we trade pair of stocks A, B, having price series A(t), B(t)
* we need to calculate ratio time series R(t) = A(t) / B(t)
* let's apply moving average of type T with period Pm on R(t) to get time series M(t)
* let's apply standard deviation with period Ps on R(t) to get time series S(t)
* now we can create Zscore series Z(t) as Z(t) = (R(t)  M(t)) / S(t), this time series can give us zscore to signal trading
* decision directly (in reality we have two Zscores: Zscoreask and Zscorebid as they are calculated using different prices, but for the sake of simplicity let's now pretend we don't pay bidask spread and we have just one Zscore)
About your question about the MA type  nope we always use SMA for underlying MA calculation in stddev.