Backtesting
Realistic backtesting, not just raw price math
Backtests are built to reflect what a strategy would actually have cost and earned — not an idealized, frictionless simulation.
What’s configurable
- Instrument(s), strategy, timeframe and historical period
- Starting capital and position-sizing rules
- Brokerage, transaction fees, taxes/levies where applicable
- A slippage model and spread assumptions
- Margin/leverage rules where applicable
Why it matters
A backtest that ignores fees, slippage and realistic fills will overstate performance. my ALGO agent’s backtesting engine applies the same cost assumptions a live strategy would face, so results are a more honest estimate of what actually happened.
Bias prevention
- No look-ahead bias — a strategy can only act on data available at that point in time
- No future-data leakage into indicator calculations
- Correct handling of indicator warm-up periods
- Trading-session and calendar awareness
- Explicit handling of missing or invalid market data
Metrics reported
- Total return, absolute P&L, CAGR where meaningful
- Win rate, loss rate, profit factor, expectancy
- Maximum drawdown, average drawdown, recovery factor
- Sharpe, Sortino and Calmar ratios, volatility
- Trade count, average holding period, largest win/loss
- Monthly/yearly returns and performance by instrument
Reproducibility
Every backtest stores its exact configuration alongside its results, so results can be reproduced and audited later — an important property when a strategy graduates to paper or live trading.
Important disclosure
A backtest describes how a strategy would have performed on historical data under the modeled assumptions. It is not a guarantee of future performance. Markets change, and live execution can differ from simulated fills.