EA-52043 · Statistical Arbitrage

2-Pair Correlation EA

This EA trades two currency pairs based on their statistical correlation, opening opposing positions when the pairs diverge from their historical correlation relationship and closing when correlation normalizes. It exploits temporary mispricing between correlated instruments using a pairs trading approach. The strategy assumes mean reversion of the correlation spread between the two selected symbols.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsCorrelation, Standard Deviation, Z-Score
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Blow-up risk: No blow-up pattern found

  • Can hold up to 2 positions at once

On its own this is not a typical blow-up pattern, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

This EA employs a statistical arbitrage/pairs trading strategy, with the core concept that price divergence between two highly correlated currency pairs will eventually revert to the mean. Entry conditions trigger when the spread or correlation between the two pairs deviates beyond a configured threshold from historical norms, opening a long position on one pair and a short position on the other to hedge directional market risk. Exit conditions close both positions when the correlation normalizes or the spread converges, capturing the reversion profit, with stop-losses potentially set for when divergence continues to widen. Position sizing typically adjusts lot sizes based on the volatility ratio and pip value differences between the two instruments to ensure equal monetary exposure on both sides. Money management may use fixed lots or balance-proportional sizing, while the pair trading structure inherently provides market-neutral characteristics that reduce directional risk. The overall strategy relies on the stability assumption of correlation, which can face significant drawdown during structural market regime changes.

Strengths

  • Market-neutral strategy that hedges directional risk, capable of profiting in both rising and falling markets
  • Trading based on statistical relationships provides mathematical and empirical foundation
  • Pairs trading inherently limits directional exposure, making drawdowns relatively more controlled

Weaknesses

  • Relies on correlation stability assumption; correlation breakdowns during structural market shifts can cause severe losses
  • Different pip values, volatility, and trading sessions between the two instruments can result in imperfect hedging
  • Requires simultaneously managing orders on two symbols, increasing execution risk and slippage costs

Possible improvements

  • Add dynamic correlation monitoring with adaptive threshold adjustment, automatically reducing position size or pausing trading when correlation weakens
  • Replace simple correlation analysis with cointegration testing to more accurately assess the mean-reversion property of the spread

Risk assessment

Overall risk: Medium

  • Correlation breakdown risk: Black swan events or structural market changes can cause correlation to suddenly vanish, invalidating the hedge and producing losses on both sides
  • Execution risk: Inability to fill both symbols' orders simultaneously can create hedge gaps, especially during low liquidity conditions

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation3.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
Symbol1EURUSDFirst trading symbol
Symbol2GBPUSDSecond trading symbol
CorrelationPeriod100Correlation calculation period
EntryThreshold2.0Entry deviation threshold in standard deviations
ExitThreshold0.5Mean reversion exit threshold
LotSize0.1Base trading lot size
StopLoss500Stop loss in points
MagicNumber52043Magic number filter for order selection

Similar Statistical Arbitrage EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.