Statistics
This EA applies statistical methods to analyze price data and generate trading signals based on statistical deviations from expected values. It uses statistical measures such as mean, standard deviation, and z-scores to identify overbought and oversold conditions, entering trades when price deviates significantly from its statistical norm. The strategy systematically opens positions based on statistical probability thresholds and exits when price reverts toward the mean.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
- Has no stop loss or trailing stop
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
The core strategy of this EA is statistical arbitrage, trading based on the statistical principle that price tends to revert to its mean. Entry conditions trigger when price deviates from the statistical mean beyond a defined threshold (e.g., z-score exceeding a set standard deviation level), operating on the probabilistic advantage that price will revert. Exit conditions include price returning to the mean vicinity, reaching take-profit targets, or hitting stop-loss levels. Position sizing may dynamically adjust based on statistical confidence levels, with larger deviations potentially warranting larger positions, or it may employ fixed lot sizing. Money management likely calculates risk exposure per trade based on account balance and a risk percentage. The overall strategy relies on statistical principles assuming mean-reverting price distribution, but may face consecutive losses during trending markets where price persistently drifts away from the mean.
Strengths
- Grounded in statistical theory, the trading logic is supported by a mathematical foundation
- Mean reversion strategy performs robustly in ranging markets with a relatively high win rate
- Parameterized design allows users to optimize for different instruments and market conditions
- Standardized metrics like z-scores make the strategy portable across instruments at different price levels
Weaknesses
- Mean reversion strategies are prone to sustained losses in strong trending markets where price may never revert
- Lacks a trend filter mechanism, potentially adding positions against the trend in directional markets
- Fixed lot sizing does not account for volatility changes, leading to uneven risk exposure across market regimes
- Statistical distribution assumptions may break down; normal distribution models are unreliable during extreme market events
Possible improvements
- Add a trend filter (e.g., ADX or long-period moving average) to pause or reduce trading during trending markets
- Introduce dynamic position sizing that adjusts based on current volatility or z-score magnitude
- Implement non-normal distribution handling, such as using median and interquartile range instead of mean and standard deviation
Risk assessment
Overall risk: Medium
- Mean reversion assumption fails during extreme trending markets, potentially causing consecutive counter-trend losses
- Lacks market regime identification to adaptively switch strategy modes
- Fixed statistical period parameters cannot adapt to structural changes in market volatility
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
StatPeriod | 20 | Statistical period for mean and standard deviation |
DeviationThreshold | 2.0 | Entry deviation threshold; trades when Z-score exceeds this |
StopLoss | 50 | Stop loss in points |
TakeProfit | 100 | Take profit in points |
LotSize | 0.1 | Fixed trading lot size |
Timeframe | H1 | Timeframe for statistical analysis |
Similar Statistical Arbitrage EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.