Author Topic: Why do you use Z-Score for entry?  (Read 6176 times)

damiano

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Why do you use Z-Score for entry?
« on: January 04, 2014, 05:02:09 pm »
Hello Pairtraders :)

Looking at the backtest on this website I always noticed that entries are made using Z-Score value and its deviations (usually +2/-2).

Does it is not risky? I mean...
As far as I know zscore is calculated doing: (RATIO - AVERAGE) / DEVIATION
where average and deviation are calculated on ratio serie.

average and deviation change during the time so if i entry when the zscore is +2 and then exit when it is at zero... it does not mean that I make a profit, maybe yes but it is not sure.

So, the question is: why do we have to see at zscore when its value could be misleading?

Thank you!

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 338
  • Karma: +13/-0
    • Pair Trading Lab
Re: Why do you use Z-Score for entry?
« Reply #1 on: January 05, 2014, 01:47:11 pm »
Hello Damiano,

the whole point of trading pairs is (beyond the market neutrality) the fact that good pairs exhibit some statistical properties to make them quantitatively tradeable.

For good pairs, these statistical properties (usually referred as cointegration) allow us to use some approaches for trading these pairs - in this case, the mean reversion.

If we assume the pair is cointegrated, we can use various algorithms to trade the pair - in PTL these are referred as models. PTL allows you to choose between Ratio or Residual models.

Basically all mean reversion models (including PTL's ones) work in some way with the mean and standard deviation from the mean (because of the mean reversion approach we try to fit to the pair). Therefore, the Z-Score (normalized deviation) is the metrics we want to use, because it indicates how far the pair went from the mean. If the Z-Score is high enough, we enter the position and speculate that the pair will converge back "to the mean".

You are right that both mean and the standard deviation may "drift" away after you entered the position. This is because no pair is ideal and the cointegration diminishes from time to time. If you had traded an ideal, perfect pair, there should be no drift at all.

The drift of the standard deviation is no problem here, as long you close your position on Z-Score=0, which is the typical setup (for Z-score=0, the std deviation is not relevant).

The drift of the mean is the problem here, which can cause that even if you exit at 0 you end in break-even or loss. This happens especially when the ratio trends fast. There is nothing to avoid it. Actually, in this case the Z-score exit points behaves like a stop-loss instead of the target.

PTL Trader offers you an optional extra rule to exit only on certain profit threshold in addition to the Z-score exit rule, which effectively means you exit on the opposite side of z-score. Example: exit on Z-score 0 with min profit 0. See the wiki for more details.

I hope this is more clear for you now.



damiano

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Why do you use Z-Score for entry?
« Reply #2 on: January 05, 2014, 04:52:55 pm »
Ok, I get the point. Thank you for clarification