Calculating and Reporting Expert Advisor Backtest Performance Metrics
Summary
The document explains how to compute and export a trading history report for an Expert Advisor. It accumulates trade profit, commission, and swap, tracks account balance peaks and troughs for absolute and percentage drawdown, and summarizes winning and losing trades, streaks, gross profit and loss, profit factor, and expected payoff. It also describes estimating the initial deposit from account history and optionally measuring trade results in points instead of money.
A sample report illustrates the output, including 821 trades, a slightly negative net result, a profit factor just below one, and drawdown measures. The figures show how several statistics can describe different aspects of a test, such as win rate alongside payoff and losing streaks. The article is primarily an implementation example, not an evaluation of a trading strategy. Its results depend on the selected history and accounting conventions, and the provided sample alone does not establish future performance or robustness.
Key ideas
- The report adds profit, commission, and swap to reconstruct the running balance.
- Drawdown is measured from balance peaks to subsequent troughs, in both money and percentage terms.
- Profit factor compares gross winning amounts with gross losses, while expected payoff combines average wins and losses with their frequencies.
- The report includes trade counts, directional win rates, trade extremes, averages, and consecutive streak statistics.
- Initial deposit can be reconstructed from account history, and trade performance can alternatively be expressed in points.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.