liveBook · Manning

Backtesting

Also called backtest

Backtesting is the retrospective evaluation of a strategy, model, or process by applying it to historical data or cases to assess its performance or effects.

How 2 Manning books explain it

Build a Robo-Advisor with Python (From Scratch)

Backtesting is the evaluation of an investment strategy by simulating its application to historical market data.

How it is used
Evaluates rebalancing policies on historical market data to compare taxes, trading costs, and target-weight deviations.
How deep it goes
Implements a daily simulation with holdings, dividends, trades, spreads, taxes, weights, and annualized summary statistics.
Examples
Compares interval-based, threshold-based, and optimization-based rebalancing using six assets and a ten-year historical period.
What you can do after
Build it from scratch in Python with yfinance, then compare strategy performance, costs, turnover, and tracking behavior.

Read how Build a Robo-Advisor with Python (From Scratch) explains backtesting →

AI Model Evaluation

An evaluation technique that compares model predictions with outcomes that actually occurred in historical data.

How it is used
Compares model predictions with historical outcomes to support offline product and engineering evaluation.
How deep it goes
Explains historical inputs, dataset roles, and representativeness risks, but does not detail scoring formulas or implementation code.
Examples
Uses production events, user behavior, system decisions, labels, outcomes, interactions, and synthetic rare-failure cases.
What you can do after
Evaluate model predictions against historical outcomes while judging whether the data represents realistic product behavior.

Read how AI Model Evaluation explains backtesting →

Also covered in

Related concepts

Questions about backtesting

What is backtesting?

Backtesting is the retrospective evaluation of a strategy, model, or process by applying it to historical data or cases to assess its performance or effects.

Which Manning books explain backtesting?

Build a Robo-Advisor with Python (From Scratch) and AI Model Evaluation.

What is the difference between backtesting and historical simulation?

Backtesting is the retrospective evaluation of a strategy, model, or process by applying it to historical data or cases to assess its performance or effects. Historical simulation uses observed data from past periods or events to generate scenarios or evaluate a decision process, strategy, or model.

What is backtesting a kind of?

Backtesting is a kind of simulation. Simulation is the modeled enactment of a system, process, or scenario under specified conditions to examine its behavior or possible outcomes.

What is backtesting also called?

Backtesting is also called backtest.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.