# 10. Backtesting, Replay, and Leakage Control

> Chapter 10 of 10 · 9 entries · Web version: https://finance-agents.dev/chapters/10-backtesting-replay-and-leakage-control

Finance-specific reliability layer: point-in-time data, look-ahead bias control, deterministic replay, and realistic cost models. General agent durability belongs in agent-infra style lists; this chapter is market-time correctness.

## Harnesses and engines

- [TraderHarness](https://github.com/HephaestLab/TraderHarness) - ⭐ Contamination-resistant point-in-time backtest and replay for LLM traders.
- [nautilus_trader](https://github.com/nautechsystems/nautilus_trader) - Deterministic production-grade trading engine usable as an agent execution substrate.
- [vectorbt](https://github.com/polakowo/vectorbt) - High-performance vectorized backtesting often wrapped by strategy agents.
- [backtesting.py](https://github.com/kernc/backtesting.py) - Simple, readable Python backtesting library for strategy prototypes.
- [pybroker](https://github.com/edtechre/pybroker) - Python algorithmic trading with ML-friendly backtesting hooks.
- [zipline-reloaded](https://github.com/stefan-jansen/zipline-reloaded) - Maintained Zipline fork for Pythonic event-driven backtests.
- [Lean](https://github.com/QuantConnect/Lean) - QuantConnect's open-source event-driven engine for backtests and live trading.
- [llm-agent-trader](https://github.com/jason8745/llm-agent-trader) - Backtesting system where an LLM makes the trade decisions, with FastAPI and Next.js UI.
- [vectorbt-backtesting-skills](https://github.com/marketcalls/vectorbt-backtesting-skills) - Agent skills for writing and running VectorBT backtests (India, US, crypto).

## Pitfall Tip

If your backtest can see tomorrow's close, your agent is cheating. Prefer PIT datasets, embargoed splits, and replay logs that pin model + data versions.

Related: [Guides](https://finance-agents.dev/guides/)

---

Not investment advice. Inclusion does not mean endorsement. CC0 1.0 · https://github.com/aowang-ai/awesome-finance-agents

Maintained by Ao Wang (https://aowang.ai).
