Skip to content
All library documents

Pair Trading with Correlation and Cointegration

Article MQL5 articles

Summary

The document explains two statistical arbitrage approaches for trading related currency pairs: correlation and cointegration. In the correlation method, traders select historically related pairs, monitor changes in their correlation, and enter opposing positions when correlation reaches an extreme. The example uses moving averages to set each leg’s direction and relates position sizes by point value. Pearson correlation is compared with Spearman rank correlation, which the article presents as less sensitive to distribution assumptions and better able to detect monotonic nonlinear relationships.

Cointegration is presented as a separate way to identify pairs whose price series share a long-term relationship. The method estimates a spread using least squares, then trades deviations from zero, closing positions as the spread returns. The article reports that its example expert advisors showed balance changes over a historical test period and that the Spearman version performed better than the Pearson version with the same parameters, but it provides no detailed performance statistics here. Relationships can change, extreme moves can cause losses, and results depend on pair selection, correlation period, and risk controls; the strategies require further study before practical use.

Key ideas

  • Pair trading seeks to profit when related instruments move back toward a historical relationship.
  • Correlation strategies use extreme correlation readings to trigger opposing positions in selected currency pairs.
  • Spearman rank correlation can capture monotonic relationships that Pearson correlation may miss.
  • Cointegration strategies trade a fitted spread when it moves away from zero and exit as it returns.
  • Changing relationships and adverse price moves make risk controls and ongoing validation essential.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.