Skip to content
All library documents

Filtering Correlated and Cointegrated Pairs for Prediction-Based Trading

Article MQL5 articles

Summary

This article introduces statistical arbitrage through correlation, cointegration, and the Pearson coefficient, then demonstrates a screening workflow using historical prices. Its Python example compares instrument pairs, retains those above a correlation threshold, and checks them with a cointegration test. The document shows example forex and crypto pairs, followed by an Amazon and Netflix prediction experiment using MetaTrader 5, neural network models, and stop-loss and take-profit settings.

The examples illustrate how statistical tests can narrow a universe of candidate pairs and how predictions might be incorporated into an arbitrage strategy. However, the article does not establish that the listed pairs are profitable or that their relationships will persist. Correlation alone does not demonstrate cointegration, and the provided examples lack a rigorous out-of-sample performance analysis, transaction costs, and risk evaluation. The author explicitly presents the trading system as an example requiring further testing and model updates.

Key ideas

  • Correlation measures co-movement, while cointegration tests whether a relationship between time series remains stable over time.
  • The example screens pairs using a Pearson correlation threshold followed by a cointegration test.
  • The article combines pair selection with prediction models and adjustable stop-loss and take-profit settings.
  • Historical statistical relationships may break when market conditions change, so screened pairs require further validation.

Tags

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