Research result
No edge foundEUR/USD intraday mean reversion
EUR/USD · 15-minute barsNov 2012 – Mar 2022 · 230,400 bars · bid-only mirror data
The price does drift back toward a Kalman fair value, with a half-life of about 66 hours. After real costs, trading that drift was not profitable, in the full backtest or on unseen data.
- Hypothesis tested
- Deviations of EUR/USD from a Kalman fair value are stationary, mean-reverting, and tradable after real costs.
- Result
- Not supported. The residual is mean-reverting, but that did not make it tradable: the Sharpe ratio was −0.33 in the full backtest and −0.52 on unseen data.
- How it was tested
- Costs included
- Tested on unseen data
- 97 one-month tests
- Total return
- −30.6%
- Max drawdown
- −43.4%
- Sharpe ratio
- −0.33
- Profit factor
- 0.82
- Walk-forward Sharpe
- −0.52
- Profitable test months
- 21.6%
97 out-of-sample folds
This is the full report behind the summary above. Every number is the actual output of running the study end to end. Nothing was edited by hand, and a separate audit step recomputes each headline figure with independent code.
1. Strategy overview
1.1 Hypotheses
H1. EUR/USD has a hidden, slow-moving fair value that we can estimate in real time with a Kalman filter, a filter that tracks both the level and the slope of the price, using only past prices. When the price drifts away from this fair value, the gap should be (a) statistically stationary and (b) mean-reverting, meaning it comes back with a predictable half-life. If that is true, buying when the price is too low, selling when it is too high, and closing when it reverts should make money after real trading costs.
H2. The reversion should work best when liquidity is deepest (the London and New York sessions, especially when they overlap) and worst when the market is going through a structural shift. A rolling stationarity check should catch those bad periods and avoid trading in them.
The point of the study is to test this, not to assume it. If the edge does not survive real costs, that is the result we report.
1.2 Signal generation and execution
| Element | Rule | Why |
|---|---|---|
| Equilibrium | Kalman filter tracking level and slope, from past prices only. Noise levels are calibrated once on a burn-in period, then frozen. | A fair value that adapts over time, with no look-ahead |
| Residual | , standardized as | A deviation measure that is not tied to a price scale |
| Entry | goes long, goes short. Checked at bar close, filled at the next bar's open. | Keeps the strategy strictly causal |
| Exit | Close the trade once crosses 0 | Take the reversion profit |
| Stop loss | Exit if , with the distance scaling with volatility | Cut trades where the setup has broken down |
| Time stop | Force an exit after a fixed multiple of the measured half-life | Do not let a trade drag on |
| Session gate | Enter only between 07:00 and 17:00 UTC | Tests H2 |
| Stationarity gate | Enter only if a rolling test says the residual is currently mean-reverting | Trade only while the setup is valid |
| Data-quality gate | Skip bars flagged as bad ticks | Basic hygiene |
| Position size | Fixed at 5 standard lots (1 lot = 100,000 EUR, $10 per pip per lot, so $50 per pip) | A fixed-size design |
| Costs | Spread and slippage per side, plus commission per lot per side | Realistic accounting |
1.3 Configuration
| Parameter | Value |
|---|---|
| Target analysis window | 10.0 years (most recent available) |
| Pip size, lot size, pip value | 0.0001, 100,000 units, $10 per lot |
| Lots per trade | 5 (fixed) |
| Starting account equity | $100,000 |
| Spread | 0.5 pips |
| Slippage | 0.1 pips per side |
| Commission | $3.50 per lot per side |
| Risk-free rate (annual) | 4% |
| Kalman burn-in | 12,480 bars (about 26 weeks), excluded from trading |
| Level and slope timescales | 480 bars (about 5 trading days) and 4,800 bars (about 50 trading days) |
| Rolling volatility window | 2,400 bars (about 25 trading days) |
| , , | 2.0, 0.0, 4.0 |
| Time stop | 2.0 × half-life |
| Session window (UTC) | 07:00 to 17:00 |
| ADF window, stride, α, max lag | 5,000 bars, 96 bars, 0.05, 12 |
| Walk-forward train and test | 12,480 and 2,080 bars |
| Walk-forward grid | 1.5, 1.75, 2.0, 2.25, 2.5 |
| Monte Carlo | 1,000 paths, blocks of 10 trades |
| Ruin floor | 30% of starting equity |
| Random seed | 42 |
2. Technical implementation
2.1 Data
The data loader tries three sources in order: a local CSV file, a live download from Dukascopy (needs open internet), and a verified public mirror of a broker feed for restricted networks, covering 2012-11 through 2022-03. In this run:
- The Dukascopy download was not available, so the loader fell back to the mirror.
- The mirror worked: 230,400 rows from 2012-11-14 13:00 UTC to 2022-03-04 21:45 UTC, which is 9.30 years of 15-minute bars.
- The broker's clock was converted to UTC and checked against known weekly market opens. 97.4% of 495 weekly opens lined up exactly.
- The file's checksum was recorded and the data cached, so later runs do not need to download it again.
The mirror covers 9.30 of the 10.0 years requested, and the study says so openly rather than quietly using less data. Re-running with open internet access would extend the sample to the present and replace the assumed 0.5-pip spread with real bid and ask prices.
2.2 Data hygiene
- Rows: 230,400 in, 230,400 out. Nothing was dropped.
- Duplicate timestamps: 0. Rows with inconsistent open, high, low and close values: 0.
- Bad-tick outliers flagged but kept: 648.
- Gaps larger than one bar within a week: 31, the largest being 3 hours 45 minutes.
- Price range across the sample: 1.0345 to 1.3976.
2.3 Kalman equilibrium filter
A Kalman filter is applied to the log of the price, tracking the current level and the current slope at the same time. It looks only at past prices, so there is no look-ahead. The noise scale is estimated once on the burn-in period and then frozen. This sets how fast the estimate of fair value may move: the level over roughly 5 days, and the slope over roughly 50 days. The filter took 2.4 seconds to build over all 230,400 bars, and the burn-in bars are excluded from trading.
Exhibit 1
Price against the causal Kalman equilibrium (last six months of the sample), and the residual

2.4 Residual model
The gap between the price and the filter's fair value is the residual. It is modelled as an AR(1) process, the discrete version of an Ornstein–Uhlenbeck process, a standard description of mean reversion:
The half-life is how long it typically takes for half of a deviation to disappear. The trading signal is the residual divided by its own rolling volatility, so entries, exits and stops adjust to how volatile the market is. Fitted on the data after the burn-in:
- AR(1) coefficient : 0.99738 (95% interval 0.99707 to 0.99768).
- Mean-reversion speed : 0.25 per day.
- Half-life: 65.9 hours (95% interval 59.1 to 74.6 hours).
- Residual size: about 5.05 basis points per bar, with a typical deviation of about 69.6 basis points.
- Using only the burn-in period, which is what the strategy can know in advance, the half-life is 56.0 hours, so the time stop is 2 × that, or 448 bars (about 4.7 trading days).
Long and short asymmetry. The study also checks whether the residual reverts at the same speed on both sides of zero.
| Side of fair value | Coefficient | Half-life | Observations |
|---|---|---|---|
| Above zero (short territory) | 0.99691 ± 0.00033 | 55.9 hours | 107,177 |
| Below zero (long territory) | 0.99680 ± 0.00034 | 54.0 hours | 110,742 |
The difference is not statistically significant (test statistic +0.23, against a threshold of 1.96). Reversion is essentially as fast above fair value as below it, so there is no asymmetry to exploit.
2.5 Stationarity monitor
To trade only when mean reversion is actually present, a rolling Augmented Dickey–Fuller test checks the residual over a window of about 52 trading days, refreshed daily. A trade may be entered only if the latest test says the residual is mean-reverting.
2,348 rolling tests were run in 7 seconds. Mean reversion was confirmed in only 34.6% of those windows: the fair-value model was statistically valid roughly one third of the time.
Exhibit 2
Rolling ADF p-value on the Kalman residual. The strategy trades only below the dashed line (0.05)

2.6 Event-driven backtest
The backtest steps through the data bar by bar. At each close it checks the signal and every gate. A triggered trade is filled at the next bar's open, with spread, slippage and commission in the fill price. Every bar, the open position is marked to market and a cash ledger records every trade. Position size is fixed at 5 lots ($50 per pip). If equity ever falls to 30% of the starting balance, trading halts, which simulates a margin call.
The base run finished in 0.2 seconds, took 95 trades, and ended with $69,415 of the starting $100,000. The margin-call halt was never triggered.
3. Backtest results
3.1 Headline metrics
| Metric | Value |
|---|---|
| Win rate | 47.37% |
| Total return | −30.59% |
| Maximum drawdown | −43.36% |
| Sharpe ratio | −0.329 |
| Sortino ratio | −0.463 |
| Profit factor | 0.821 |
| CAGR | −4.11% |
| Calmar ratio | −0.095 |
| Expectancy per trade | −$322 |
| Average holding period | 290.1 bars |
| Exposure | 12.79% of bars |
| Turnover | 151 times a year |
| Trades | 95 |
| Final equity | $69,415 |
These use standard definitions. Win rate is the share of trades that made money. Maximum drawdown is the worst peak-to-trough fall in equity. The Sharpe ratio measures return above the risk-free rate per unit of risk. Profit factor is total gains divided by total losses. Sortino penalises only downside volatility. CAGR is the annualised growth rate, and Calmar is CAGR divided by maximum drawdown.
3.2 Equity curve and drawdown
Exhibit 3
Equity and drawdown, 5 lots fixed, all costs included

3.3 Worked example: the first three trades
| Entry time | Side | Entry price | Exit price | P&L | Exit reason |
|---|---|---|---|---|---|
| 2013-10-22 13:15 | short | 1.376385 | 1.377505 | −$595 | time |
| 2014-01-31 12:45 | long | 1.351185 | 1.359485 | +$4,115 | target |
| 2014-03-06 16:15 | short | 1.386615 | 1.395465 | −$4,460 | time |
For each trade the gross P&L is the price move times the position size (5 lots, $10 per pip each), and then $35 of round-trip commission is subtracted ($3.50 per lot per side, 5 lots, 2 sides). Spread and slippage are already in the entry and exit prices. For the second trade, an 83-pip gain on 5 lots is 83 × $10 × 5 = $4,150 gross, minus $35 commission, which is $4,115 net and matches the ledger.
3.4 Annual returns
Trading started on 2013-06-25, once the burn-in and volatility warm-up were done, and ran to 2022-03-04.
| Year | Return |
|---|---|
| 2014 | +8.99% |
| 2015 | −10.49% |
| 2016 | −26.98% |
| 2017 | +23.15% |
| 2018 | −10.30% |
| 2019 | +9.45% |
| 2020 | −2.22% |
| 2021 | −18.09% |
| 2022 (partial) | +1.24% |
The worst year was 2016, with one very bad month (−19.61% in February). The best was 2017, driven by a strong August (+24.79%).
3.5 Trade-level breakdown
By side
| Side | Trades | Win rate | Total P&L | Average P&L |
|---|---|---|---|---|
| Long | 38 | 53% | −$31,215 | −$821.45 |
| Short | 57 | 44% | +$630 | +$11.05 |
Long trades were fewer but did nearly all of the damage. Short trades were roughly break-even.
By exit reason
| Exit reason | Trades | Total P&L | Average P&L |
|---|---|---|---|
| Stop | 19 | −$37,375 | −$1,967.11 |
| Target | 36 | +$128,210 | +$3,561.39 |
| Time | 40 | −$121,420 | −$3,035.50 |
Trades that reached their reversion target made good money. But trades forced out by the time stop were the most common exit, and together they lost more than the target trades earned. The three largest wins all hit their target ($7,790, $7,480 and $6,080). The three largest losses all ended by a time stop or a hard stop, the worst being a −$12,410 long trade held for almost the maximum allowed time that never came back.
Exhibit 4
Trade profit and loss, total by side, and holding time

4. Integrity verification
The study includes a dedicated check that recomputes every headline number a second time with independent code, and stops the whole run if anything differs. A clean pass means each of these held on this data:
- Final equity equals starting equity plus all realised trade P&L plus any open position, to floating-point precision.
- Every trade's P&L was recomputed from its recorded entry and exit prices and matched.
- 25 randomly chosen trades were checked one by one: was the entry signal valid at the time, was the stationarity gate open, was it inside the session, and was the fill exactly the next bar's open plus costs.
- Win rate, total return, maximum drawdown, Sharpe, profit factor, Sortino and expectancy were recomputed with separate formulas and matched.
- The equity curve has no gaps after warm-up, every trade used exactly 5 lots, and no trade was held longer than the time stop allows.
Result: 13 checks, all passed.
5. Risk and robustness
5.1 Drawdown profile
| Peak | Trough | Depth | Days to trough | Days to recover |
|---|---|---|---|---|
| 2015-01-02 | 2016-12-20 | −43.36% | 718 | not recovered |
| 2014-05-09 | 2014-09-30 | −15.29% | 144 | 71 |
| 2014-12-11 | 2014-12-16 | −8.33% | 4 | 16 |
| 2014-03-11 | 2014-03-20 | −7.94% | 9 | 49 |
| 2013-10-23 | 2013-10-25 | −4.05% | 1 | 104 |
The account was below its previous peak for 95.3% of all bars, and the longest stretch underwater lasted 2,618 days. The deepest drawdown, from 2015 to 2016, was never recovered within the sample.
5.2 Sensitivity analysis
Each row is a completely separate backtest that changes one setting from the base configuration.
| Scenario | Sharpe | Profit factor | Total return | Max drawdown | Trades |
|---|---|---|---|---|---|
| Spread × 1 (0.5 pip, base) | −0.329 | 0.821 | −30.59% | −43.36% | 95 |
| Spread × 2 (1.0 pip) | −0.341 | 0.809 | −32.96% | −44.18% | 95 |
| Spread × 3 (1.5 pip) | −0.353 | 0.797 | −35.33% | −45.00% | 95 |
| Lots = 1 | −1.411 | 0.821 | −6.12% | −9.33% | 95 |
| Lots = 2 | −0.771 | 0.821 | −12.23% | −18.31% | 95 |
| Lots = 3 | −0.543 | 0.821 | −18.35% | −26.96% | 95 |
| Lots = 4 | −0.416 | 0.821 | −24.47% | −35.31% | 95 |
| Lots = 5 (base) | −0.329 | 0.821 | −30.59% | −43.36% | 95 |
| Lots = 6 | −0.259 | 0.821 | −36.70% | −51.13% | 95 |
| Time stop = 1 × half-life | −0.388 | 0.830 | −25.04% | −44.46% | 107 |
| Time stop = 2 × half-life (base) | −0.329 | 0.821 | −30.59% | −43.36% | 95 |
| Time stop = 3 × half-life | −0.207 | 0.943 | −9.19% | −32.27% | 92 |
| Equilibrium horizon = 240 bars (about 2 days) | −0.097 | 0.907 | −38.95% | −73.08% | 266 |
| Equilibrium horizon = 480 bars (base) | −0.329 | 0.821 | −30.59% | −43.36% | 95 |
| Equilibrium horizon = 960 bars (about 10 days) | −0.393 | 0.834 | −13.96% | −43.37% | 71 |
Profit factor and win rate barely change with lot size, but total return and drawdown scale up non-linearly because the account is finite. No combination tested here, whether spread, lot size, time stop or equilibrium timescale, produced a Sharpe ratio above zero.
Exhibit 5
Sharpe ratio and profit factor across entry and stop thresholds. Sharpe is negative in every cell

5.3 Regime performance
By session
| Session | Trades | Win rate | Total P&L | Average P&L |
|---|---|---|---|---|
| London and New York overlap | 38 | 50% | −$8,070 | −$212.37 |
| London morning | 47 | 45% | −$27,395 | −$582.87 |
| New York late | 8 | 50% | +$4,405 | +$550.62 |
| Other | 2 | 50% | +$475 | +$237.50 |
By volatility level
| Regime | Trades | Win rate | Total P&L | Average P&L |
|---|---|---|---|---|
| Low | 32 | 41% | −$35,385 | −$1,105.78 |
| Mid | 31 | 55% | +$18,230 | +$588.06 |
| High | 32 | 47% | −$13,430 | −$419.69 |
By trend direction
| Trend | Trades | Win rate | Total P&L | Average P&L |
|---|---|---|---|---|
| Downtrend | 69 | 46% | −$24,965 | −$361.81 |
| Uptrend | 26 | 50% | −$5,620 | −$216.15 |
This does not match what H2 predicted. The busiest, deepest-liquidity session was not the best performer. Only the small New York late and "other" buckets were clearly profitable, and medium-volatility periods did better than both low and high.
One variant was also tested: blocking short trades during strong uptrends while leaving longs alone. It gave 88 trades, a Sharpe of −0.348, a profit factor of 0.830, a total return of −26.28% and a maximum drawdown of −41.19%. That is a smaller loss than the base version, but still a loss, so the base configuration remains the main result.
6. Walk-forward test (out of sample)
This test uses rolling 6-month training windows followed by 1-month test windows. In each fold the entry threshold is chosen from a grid by what worked best in training, then applied unchanged to the next month it has not seen.
- 97 folds were tested.
- Out-of-sample Sharpe ratio: −0.517.
- Out-of-sample total return: −35.34%. Out-of-sample maximum drawdown: −44.03%.
- The threshold picked most often was 2.5, though all five grid values were picked at some point.
- Only 21.6% of the out-of-sample months were profitable.
The out-of-sample result is worse on every metric than the in-sample backtest, a strong sign that the strategy has no real, stable edge.
Exhibit 6
Walk-forward out-of-sample equity, 97 folds

7. Monte Carlo simulation
To see how much of the result is luck in the order the trades happened, the study shuffles the actual 95 trades into new random sequences, in blocks of 10 trades to keep some short-term structure, and repeats this 1,000 times.
- Chance of ending with a loss: 84.4%.
- Chance of a drawdown worse than −20%: 97.8%.
- Final outcomes: the worst 5% of runs lost more than $80,600, the median run lost $31,100, and even the best 5% gained only $16,500.
- Drawdowns: the worst 5% were worse than −84.3%, the median was −47.4%, and even the best 5% had a drawdown of −23.6%.
Even a best-case reshuffling of the trade order leaves a typical loss. That points to a problem with the strategy's actual edge, not bad luck in how the trades lined up.
Exhibit 7
Block-bootstrap Monte Carlo: terminal P&L (left) and maximum drawdown (right)

8. Conclusion
The study ends with an automatic pass or fail check against six criteria set in advance, based only on what was measured:
| Criterion | Result |
|---|---|
| No margin-call halt at the required 5-lot size | Passed |
| Residual is stationary most of the time (more than 60% of windows) | Failed (34.6%) |
| Positive expectancy after costs (profit factor above 1) | Failed (0.821) |
| Risk-adjusted return beats the risk-free rate (Sharpe above 0) | Failed (−0.329) |
| Out-of-sample Sharpe above 0 | Failed (−0.517) |
| Chance of a loss under 50% (Monte Carlo) | Failed (84.4%) |
Verdict: not supported. 1 of 6 criteria passed, on data from 2012-11-14 to 2022-03-04.
The statistical side of the hypothesis, that the residual is stationary and mean-reverting, held only part of the time. The economic side, that it makes money after real costs, failed clearly. The session, volatility and trend patterns did not line up with what was expected either.
The bottom line: on this data, at the required position size, and with realistic trading costs, this EUR/USD mean-reversion strategy did not make money.
Limitations
- Data and spread realism. This run used the backup data source, which has only bid prices up to 2022-03 and assumes a 0.5-pip spread, tested up to three times that. A run with open internet access would extend the data to today and use real bid and ask spreads.
- One instrument, one timeframe. The results are specific to EUR/USD on 15-minute bars and need not hold for other pairs or timeframes.
- Fixed 5-lot size. It makes risk scale unevenly with account size. The lot-size rows in the sensitivity table show that effect directly instead of hiding it.
- No holiday calendar or news filter. Interest-rate decisions, jobs reports and inflation releases are not excluded, though the code could add that without other changes.
- Many settings were tested, so the full table of results is shown rather than only the best-looking row, to avoid mistaking a lucky combination for a finding.
Research by Lanre Ibrahim. Source: EURUSD_Kalman_OU_MeanReversion notebook and EURUSD strategy summary report. Historical tests on past data; not investment advice and not the record of any managed account.