# From Backtest to Live: Paper, Shadow and Canary

> Why live results almost always trail backtests, how to measure the gap, and a staged plan for taking a strategy from backtest to paper trading to real money.

Source: https://learn.tradelabsai.com/algo-trading/backtest-to-live/  
Track: Algorithmic Trading · Level: Advanced · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "From Backtest to Live: Paper, Shadow and Canary", https://learn.tradelabsai.com/algo-trading/backtest-to-live/

Almost every strategy performs worse live than in its backtest. Some of the gap is unavoidable: the backtest was fitted to the past and the future is different. Much of it is avoidable: optimistic cost assumptions, fills that would never happen, data the live system cannot see and bugs in the code. The goal of moving from backtest to live is not to make the gap disappear but to understand it, keep it small and catch problems while positions are still small. This lesson focuses on algorithms; [Moving From Paper to Live Trading](https://learn.tradelabsai.com/start-here/paper-to-live-trading/) covers the same move for discretionary traders.

## Where the gap comes from

| Source | Example | Lesson |
|---|---|---|
| Overfitting | Parameters tuned to past noise | [Overfitting and Curve Fitting](https://learn.tradelabsai.com/research/overfitting-and-curve-fitting/) |
| Costs | Spread and slippage larger than assumed | [Costs and Slippage in Backtests](https://learn.tradelabsai.com/research/costs-and-slippage-in-backtests/) |
| Fill assumptions | Limit orders filled whenever price touched | [Fill Models, Partial Fills and Order Queues](https://learn.tradelabsai.com/research/fill-models/) |
| Look ahead bias | Using data before it was available | [Look-Ahead Bias](https://learn.tradelabsai.com/research/look-ahead-bias/) |
| Data differences | Live feed differs from historical vendor data | [Cleaning Market Data](https://learn.tradelabsai.com/programming/cleaning-market-data/) |
| Latency | Signals acted on later than in the backtest | [Latency in Trading](https://learn.tradelabsai.com/orders/latency-in-trading/) |
| Regime change | Market behaviour shifts | [Structural Breaks and Regime Changes](https://learn.tradelabsai.com/math/regime-changes/) |
| Capacity | Larger size moves the price | [Alpha Capacity and Crowding](https://learn.tradelabsai.com/research/alpha-capacity-and-crowding/) |

A common rule of thumb among systematic traders is to expect live Sharpe ratios well below backtested ones, often around half, though this varies widely.

## A staged rollout

| Stage | Duration (typical) | Pass criteria |
|---|---|---|
| Out of sample and walk forward tests | Before any live data | Performance holds on unseen data |
| Paper trading on live data | Weeks to months | Signals match the backtest engine replayed on the same days |
| Small live size | 1 to 3 months or a set number of trades | Fills and costs match assumptions |
| Gradual scale up | Ongoing | Results stay within expected ranges |

Paper trading tests the code and data path, but not real fills and market impact. Small live trading tests those. See [Paper Trading](https://learn.tradelabsai.com/start-here/paper-trading/).

## Measuring the gap: shadow comparison

Each day, run the backtest engine over the same period the live system traded and compare:

- **Signals:** did both generate the same trades?
- **Entry and exit prices:** how much slippage did live trading suffer?
- **Costs:** were commissions and spreads as assumed?
- **P&L:** how much of the difference is explained by each factor?

**Example: Decomposing a performance gap**
Over three months, a strategy's backtest shows a return of 4.0% while the live account returns 2.5%. A shadow comparison finds the same 120 trades in both. Average slippage live is 0.03% per trade larger than assumed, which across 120 trades and both entries and exits costs about 0.03% times 240, roughly 0.7%. Commissions were 0.2% higher than modelled. The remaining 0.6% comes from three trades where the live system entered one bar late after a data delay. The fixes are clear: update the slippage model, correct the commission rate and investigate the data delay.

## When to stop or scale down

Decide in advance what results would mean the strategy is broken rather than unlucky:

- **Drawdown beyond the backtest's worst** by a set margin. See [Maximum Drawdown](https://learn.tradelabsai.com/portfolio/maximum-drawdown/).
- **Signal mismatch** between live and backtest.
- **Costs consistently above** assumptions.
- **Performance below a statistical threshold** after enough trades. See [Statistical Significance in Trading](https://learn.tradelabsai.com/math/statistical-significance/).

Writing these rules down before going live prevents rationalising losses later.

## Common mistakes

1. **Going straight to full size** after a strong backtest.
2. **Paper trading too briefly** to see a range of conditions.
3. **Not comparing live with backtest** trade by trade.
4. **Changing the strategy mid test,** which resets what you learned.
5. **Ignoring small discrepancies** that later turn out to be bugs.

## Frequently asked questions

### Why is live trading worse than backtesting?

Overfitting, higher real costs, unrealistic fill assumptions, look ahead bias, data differences, latency and changing market conditions all reduce live results.

### How long should I paper trade an algorithm?

Long enough to see a meaningful number of trades and a range of market conditions; for many strategies that means several weeks to a few months.

### How do I know if my strategy has stopped working?

Set rules before going live, such as a drawdown limit beyond the backtest's worst, and compare live trades against backtest replays regularly.

Next, learn what to watch once an algorithm is running in [Monitoring Positions, P&L and Risk](https://learn.tradelabsai.com/algo-trading/live-monitoring/).

## Continue learning

- Next lesson: [Monitoring Positions, P&L and Risk](https://learn.tradelabsai.com/algo-trading/live-monitoring/)
- Previous lesson: [Risk Controls and Kill Switches](https://learn.tradelabsai.com/algo-trading/risk-controls-and-kill-switches/)
- Related: [Risk Controls and Kill Switches](https://learn.tradelabsai.com/algo-trading/risk-controls-and-kill-switches/): Pre trade risk checks and kill switches stop a trading algorithm before a bug becomes a disaster. Learn the essential limits, how to layer them and how to test them.
- Related: [Moving From Paper to Live Trading](https://learn.tradelabsai.com/start-here/paper-to-live-trading/): How to switch from paper trading to real money safely: readiness checks, starting size, scaling up rules and how to handle the emotional jump.
- Related: [Paper Trading](https://learn.tradelabsai.com/start-here/paper-trading/): Paper trading means practising with simulated money. Learn how demo accounts work, what they teach, their limits and how to practise so it carries over.
- Related: [Why Strategies Fail](https://learn.tradelabsai.com/research/why-strategies-fail/): Most strategies that look good in backtests fail live. Learn the main causes, from overfitting and costs to regime changes, and how to guard against each.
- Related: [Costs and Slippage in Backtests](https://learn.tradelabsai.com/research/costs-and-slippage-in-backtests/): Ignoring costs is the fastest way to fool yourself in a backtest. Learn the costs to include, how to estimate slippage and market impact, and conservative rules.
- Related: [Monitoring Positions, P&L and Risk](https://learn.tradelabsai.com/algo-trading/live-monitoring/): Running algorithms need constant monitoring. Learn the key health, trading and risk metrics to track, how to design useful alerts and how to avoid alert fatigue.
