EnglishNederlandsPortuguesEspanolDeutschFrancais

Algo Backtesting: A Reproducible Forex and Futures Workflow

By 6 min read trading Published: Last updated:
Editorial review. Published under the JPTC editorial policy. Method: JPTC research methodology. Material corrections are recorded through the corrections policy.
Part of JPTC Research Library, our complete pillar guide on this topic.
Algo Backtesting: A Reproducible Forex and Futures Workflow

A backtest runs specified rules on historical inputs under a defined simulation model. It can reveal how that implementation behaved in those conditions. It does not reproduce every possible fill, establish a future loss ceiling or prove permission for a prop-firm account. The useful output is a reproducible record, including unsuccessful tests.

1. Freeze the question and the implementation

Write the instrument, intended decision time, entry/exit conditions, sizing, session and failure behaviour before selecting results. Save the exact source or executable version, input file and dependencies. A moving-average or RSI example is a specification to test, not evidence of an edge.

Define which data may be known at each decision. A bar's closing price is unavailable at its opening. Include the publication time of news and revised data where relevant. Record the baseline and the decision criteria before examining the final evaluation period.

2. Audit the data and contract assumptions

Record feed, coverage, timestamps, timezone/DST, bid/ask availability and missing intervals. Investigate anomalies before correcting or excluding them, retain the original and log the change. Price jumps can be genuine. Tick data, generated ticks and OHLC bars are different inputs; a 99% or 99.9% quality label is not a probability that a result will hold.

For futures, record the actual contract, expiry, roll dates, session calendar, tick size/value and any continuous-series adjustment. A back-adjusted series is not itself a list of prices at which the expiring contracts could be traded. Model a defined roll method and its costs. For forex, document symbol specifications, financing and the broker's actual session/holiday handling.

3. Configure and inspect the simulator

Choose the tester matching the actual program and record modelling mode, account currency, deposit, leverage, volume steps, costs and execution assumptions. In MT5, recorded real ticks and generated every-tick modes are distinct; the tester also provides execution-delay settings. Neither mode duplicates all queue, liquidity or broker behaviour.

Run a small sanity test before optimisation. Inspect entry timestamps, fills, stops, quantities and account calculations against the specification. Include spread, commission, swaps and execution costs once. If an assumed gross result is 20 pips and separate spread/commission costs are 1.5 and 0.5 pips, the remainder is 18 pips before other costs, not automatically a loss.

4. Separate selection from evaluation

Select or optimise parameters only on the designated development data. Reserve a genuinely unused period for evaluation. In a walk-forward design, repeat chronological selection and evaluation windows and save every chosen parameter set. The MT5 Forward option is a held-out historical period; it is distinct from a later demo run.

Report all variants searched and any changes made after seeing evaluation results. Reusing a holdout to select the next winner makes it part of development. Sensitivity and resampling tests can expose dependence on assumptions, but their results are conditional on the design; randomly shuffling trades can remove real dependence and does not prove the worst future drawdown.

5. Read the report with the right definitions

Record net and gross results, costs, activity, average outcomes, balance/equity drawdowns and their currency or percentage definitions. Profit factor divides gross profit by the magnitude of gross loss, with a non-zero denominator. Recovery factor relates profit to maximum drawdown, not elapsed recovery time. Sharpe comparisons need consistent return sampling, reference rate and annualisation.

There is no universal PF, Sharpe, win-rate, number of years or number of trades that certifies a strategy. Sample dependence, selection and the uncertainty of the measured result matter. An observed peak-to-trough drawdown is also distinct from a provider's initial-balance or trailing loss rule; replay the exact programme/phase calculation, open exposure, costs and reset time.

6. Save a test package and state what remains unknown

Keep data provenance, the exact implementation/settings, all search choices, run configuration, reports and rejected results together. A rerun should reproduce the stated result within documented platform/data limitations. If it does not, investigate the mismatch instead of replacing the report with a more favourable run.

Operational checks and later authorised demo observations are separate evidence. A passing test is not an instruction to risk capital or scale. The JPTC EA Hub offers downloadable files: check each actual file's documentation and report. The separately hosted Algo requires no customer installation/VPS; its company-published monthly broker figures do not audit another strategy or establish its future results.

Sources checked 16 October 2026: Strategy Tester · MT5 test report · EA inputs and permissions · Sharpe (1994) · Data leakage.

Futures roll methodology (Campbell/CME)

Does Your Trading Algorithm Work? Read the Evidence · Test a Trading Algorithm: The Deployment Readiness Checklist · JPTC EA Hub · JPTC Algo

Broker-statement images of the separately hosted JPTC Algo
These service images do not establish another algorithm’s results, execution or provider permission.
JPTC Algo live trade screenshotJPTC Algo live trade screenshotJPTC Algo live trade screenshotJPTC Algo live trade screenshotJPTC Algo live trade screenshotJPTC Algo live trade screenshot
@jptradingcapital on Instagram →

FAQ

What is the minimum data history needed for effective backtesting?

No fixed duration certifies a strategy. Choose coverage for the actual logic, regimes, data availability and uncertainty; document the choice and the genuinely unused evaluation period.

How can I avoid overfitting during strategy optimization?

Separate development and evaluation, record every search and reselection, and test sensitivity. Walk-forward and resampling can reveal weaknesses, but none guarantees the absence of overfitting.

Can I backtest prop firm specific rules like daily drawdown and max loss?

You can implement and replay the exact programme's calculation and attempted controls, including open P&L, costs, reset and trailing references. A historical pass does not guarantee future compliance or provider permission.

What's the difference between backtesting and forward testing?

Historical simulation and a later demo run are different. MT5 also calls a reserved historical evaluation segment Forward. State which procedure you used; a demo's fills do not prove identical deployment execution.

Is free historical data reliable for serious backtesting?

Price and licensing do not determine data fitness. Check provenance, coverage, timestamps, gaps and the fields needed by the actual strategy; document limitations rather than treating paid data as automatically accurate.

Pedro Penin, Founder of JPTradingCapital, builder of the JPTC EA Hub.

Related Articles

Futures Challenge Preparation

Software, reviewed setfiles, a written risk plan and community access built around common evaluation rules. No software can guarantee a pass.

Get Started

Related Articles

trading
Verify a Backtest: Evidence, Provenance and Reproduction
6 min read
automation
Algorithmic Trading Audit Trails and Data Protection
6 min read
trading
Top Platforms for Backtesting Trading Algorithms
13 min read
Trading software for prop-firm rules
See Results →
Risk Disclaimer

Trading forex and CFDs involves significant risk and is not suitable for all investors. Past performance does not guarantee future results. You should not invest money you cannot afford to lose. The content on this page is for informational purposes only and does not constitute financial advice. JPTradingCapital does not accept liability for any loss or damage arising from reliance on the information provided. Always conduct your own research before making trading decisions.