Filtering Multi-Pair Trades with a Rolling Correlation Matrix
Summary
The article describes adding portfolio-level correlation checks to a multi-symbol Expert Advisor. The system calculates a Pearson correlation matrix from recent closing prices and evaluates each proposed trade against existing positions before execution. It uses moving-average crossover signals with a directional bias filter, while correlation thresholds and a maximum correlated-exposure setting govern whether a signal is allowed. The stated goal is to avoid redundant positions in instruments that move together and to account for potential offsetting exposure when relationships are strongly negative.
The design includes per-symbol price buffers, synchronized symbol data, scheduled correlation updates, and an optional heatmap for viewing relationships. The excerpt says the matrix is refreshed on new bars or timer events and mentions a historical test window, but supplies no actual test metrics or enough detail to assess the results. Correlations estimated from a finite lookback can shift across regimes, so the filter’s usefulness depends on its calculation settings and should not be treated as a guarantee against portfolio drawdowns.
Key ideas
- A multi-pair system can evaluate each proposed position in the context of existing portfolio exposure.
- The EA uses recent price data to build a Pearson correlation matrix across monitored symbols.
- Correlation thresholds and exposure limits can block trades that add correlated or opposing exposure.
- Correlation estimates can change with market conditions, and the excerpt gives no test statistics to establish effectiveness.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.