Home

Backtesting

Backtesting is the evaluation of a trading or investment strategy using historical data to estimate how it would have performed. It aims to assess viability, risk, and robustness before live use and to compare competing approaches.

The typical process involves assembling reliable historical data, defining entry and exit rules, and simulating trades

Performance is summarized with metrics such as annualized return, drawdown, Sharpe ratio, Sortino, maximum drawdown, win

Limitations and best practices are important: backtesting relies on historical conditions and may not predict future

under
assumed
execution
conditions,
including
costs
and
slippage.
The
test
usually
splits
data
into
a
development
(in-sample)
period
where
parameters
are
chosen
and
a
validation
(out-of-sample)
period
where
performance
is
observed.
Some
approaches
use
walk-forward
optimization
to
periodically
re-optimize
with
a
rolling
window.
rate,
and
profit
factor.
Equity
curves
and
other
visual
analyses
help
assess
risk
and
robustness.
Backtests
should
address
biases
such
as
look-ahead
bias,
survivorship
bias,
data-snooping,
and
overfitting,
and
should
consider
data
quality
and
instrument
liquidity.
results;
execution
realities,
liquidity,
market
impact,
and
regime
changes
are
often
simplified.
Best
practices
include
using
out-of-sample
testing,
multiple
data
sets,
accounting
for
transaction
costs
and
slippage,
employing
robust
risk
metrics,
conducting
code
review,
and
ensuring
reproducibility
of
the
results.