How to Backtest an EA Across Bear and Bull Markets
MARKET CRASHES & BEAR MARKETS
A reproducible MT5 testing protocol for crash strategies: regime windows, unseen data, execution stress, equity drawdown and complete reports.

← Explore the crash & bear-market research hub
By EA LAB Editorial • Published October 14, 2026 • Educational research and scenario analysis • Expanded October 14, 2026
Market Scanner: latest independent video reviews →
Development
Freeze rules
Unseen evaluation
Forward test
A convincing crash-strategy backtest tests more than the crash. It includes the period before the decline, adverse rebounds, the recovery and unrelated bullish or sideways windows. The purpose is to understand where the robot works and where it fails.
Separate history from executable data
The events of 1929, the technology bust, 2007–2009 and 2020 are useful research cases. However, a historical index chart is not necessarily valid tick data for a modern broker CFD. Do not claim a 1929 MT5 test unless the dataset, constructed instrument and execution assumptions are explicitly documented. Use historical cases for context and actual available data for executable tests.
Define the protocol before optimizing
- Select the instrument, dates and broker specification.
- Write down entry, exit, sizing and exposure limits.
- Divide data into development and evaluation windows.
- Define acceptance criteria without inspecting the evaluation result.
- Freeze the code and settings before the unseen test.
If you inspect the evaluation result and retune, that window becomes part of development. Reserve fresh data or begin a forward test; do not continue calling the repeatedly consulted window unseen.
Measure equity, not only closed-trade balance
Balance records realized outcomes. Equity includes floating gains and losses. A grid can show an attractive balance curve while carrying a large underwater basket. Publish maximum equity drawdown, open exposure and worst basket loss alongside closed-trade profit.
Stress the execution assumptions
Check spread expansion, commission, overnight financing, delayed execution and gaps where the test environment supports them. State which stresses were actually run. Do not label a report “realistic” solely because it uses ticks; the quality and cost assumptions still matter.
Where practical, compare more than one broker dataset. Differences in sessions, price feeds, contract size and financing can alter results. Preserve original reports and record the settings used to generate them.
A report readers can reproduce
Include version, SET, symbol, source, timeframe, modeling mode, dates, deposit, account currency, leverage, costs, net result, equity drawdown, trade count and direction split. Keep synthetic illustrations separate from measured performance charts.
A forward test starts before the next crisis
Record its start date and lock the version. Subsequent changes should have their own release notes and test segment. A forward test can still lose money, but it provides an auditable record without selecting the best settings after the event.
Choose the evaluation split before seeing the result
The development period is where rules and parameter ranges are selected. The evaluation period is where the frozen choice is challenged. A period cannot remain unseen once it has repeatedly influenced revisions. Naming a file out-of-sample does not change its role in the research process.
A useful split respects time. Develop on earlier observations and evaluate on later ones, rather than mixing future and past trades into random groups without considering chronology. If the strategy uses long lookbacks, define how indicator warm-up and positions crossing the boundary are handled. The boundary should not conveniently remove the largest loss.
A multi-regime evaluation can use several predeclared windows: a decline, a rebound, a range and a sustained rise. The windows should be selected by a transparent rule or broad historical dates, not by looking for the part where one preset wins. Publish why each was included and keep the complete result visible.
Example research plan without invented performance
| Stage | Rule | What is locked |
|---|---|---|
| Development | Explore declared parameter ranges on earlier data | Record every material design choice |
| Evaluation | Run the selected version on a later untouched period | Code, preset, risk and costs |
| Stress variants | Change disclosed execution assumptions | Trading rules remain unchanged |
| Forward record | Start before observing future trades | Version changes create separate segments |
Parameter stability matters more than the single winner
An optimizer can identify a best result even when the surrounding configurations are weak. Compare nearby parameter values. A broad region of acceptable outcomes is more informative than an isolated peak that disappears after a small change. Do not demand identical returns, but investigate abrupt instability.
Also compare separate time segments. A parameter set that works only in one short decline may reflect the selected episode rather than a persistent feature. A stable set should be assessed across the declared mandate, including conditions that challenge it. A short-only system may intentionally perform poorly during an uptrend; that limitation must be visible in the strategy’s activation and risk policy.
Keep the number of trials in mind. Selecting one attractive result from thousands of variants creates a different evidential burden from testing one predefined rule. Report the extent of the search. A final report without the selection history can make a highly optimized result look like an independent discovery.
A comparison readers can reproduce
Use identical account assumptions when comparing variants. Changes in deposit, leverage, contract value or risk percentage can dominate the difference between two strategies. Show both account-currency outcomes and comparable risk measures where appropriate. Explain every departure from the baseline.
Retain the source report, preset, tester log and the version identifier. A screenshot of the equity curve is useful for orientation, but cannot establish every input or transaction. If a plotted curve is reconstructed, document its source and whether it represents balance, equity or a normalized return series.
Finally, inspect unsuccessful outcomes. A useful research conclusion states which regimes caused losses and which assumptions mattered. That helps a reader decide whether the robot matches a mandate. The purpose of testing is to expose limits before deployment, not merely to choose a chart attractive enough to market.
Frequently asked questions
Is one profitable crash window enough?
No. It cannot establish robustness or reveal the cost of false bearish signals in other regimes.
What if historical broker data are unavailable?
Disclose the limitation. Do not fabricate a test or substitute an unrelated report.
Continue your research
- Nasdaq Short-Only EA Tests: How to Read the Evidence
- Short-Only vs Long-and-Short EAs in a Bear Market
- Martingale Short Robots During a Crash: Basket Targets, Equity Risk and Pyramiding
Explore the MT5 Robot Library • Visit Strategy Lab
Trading involves risk, including substantial losses. Historical market behavior and backtests do not guarantee future results. An EA automates its rules; it does not guarantee profit or portfolio protection.