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.