Home

backtest

Backtesting is the process of evaluating a trading or investment strategy by applying it to historical market data to determine how it would have performed. It is used to estimate potential profitability, risk, and robustness before deploying a strategy in live markets. Backtesting differs from paper trading or live execution in that it relies on historical price series and rules rather than current market conditions.

Typical backtests proceed by selecting a data set, calibrating the strategy's parameters, and simulating trades in

Common pitfalls: overfitting, where a strategy is tuned to past data and fails in new data; look-ahead

Backtesting informs strategy development, portfolio construction, and risk management but does not guarantee future results. It

chronological
order.
The
simulation
traces
the
performance,
recording
metrics
such
as
total
return,
annualized
return,
maximum
drawdown,
volatility,
Sharpe
ratio,
and
win
rate.
Realistic
assumptions
include
transaction
costs,
bid-ask
spread,
slippage,
and
liquidity
constraints;
adjustments
for
corporate
actions
and
data
cleaning
are
also
common.
bias
and
survivorship
bias;
data-snooping
bias;
cherry-picking
time
periods.
To
mitigate,
use
out-of-sample
testing,
walk-forward
analysis,
cross-validation
for
time
series,
and
emphasize
robustness
rather
than
sole
performance.
Use
backtesting
engines
and
generate
confidence
intervals
via
resampling.
should
be
complemented
by
forward
testing,
paper
trading,
and
live
monitoring.
Transparent
documentation
and
reproducible
code
are
emphasized
in
professional
environments.