---
title: "Backtesting"
description: "Learn how to run and debug a backtest in Lean CLI."
canonical: https://www.quantconnect.com/docs/v2/lean-cli/backtesting
markdown: https://www.quantconnect.com/docs/v2/lean-cli/backtesting.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/05%20Lean%20CLI/08%20Backtesting
modified: 2026-11-12
index: https://www.quantconnect.com/llms.txt
---

# Backtesting

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Lean CLI](https://www.quantconnect.com/docs/v2/lean-cli.md) > Backtesting

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Pages in This Section

- [Deployment](https://www.quantconnect.com/docs/v2/lean-cli/backtesting/deployment.md): Learn how to deploy a backtest in Lean CLI.
- [Debugging](https://www.quantconnect.com/docs/v2/lean-cli/backtesting/debugging.md): Learn how to debug a backtest in different editor supported by Lean CLI.
