---
title: "lean cloud backtest"
description: "API reference for the command `lean cloud backtest` in command line console."
canonical: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-cloud-backtest
markdown: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-cloud-backtest.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/05%20Lean%20CLI/99%20API%20Reference/03%20lean%20cloud%20backtest
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# lean cloud backtest

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Lean CLI](https://www.quantconnect.com/docs/v2/lean-cli.md) > [API Reference](https://www.quantconnect.com/docs/v2/lean-cli/api-reference.md) > lean cloud backtest

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

## Introduction

Backtest a project in the cloud.

```
$ lean cloud backtest [OPTIONS] PROJECT
```

To use the CLI, you must be a member in an [organization](https://www.quantconnect.com/docs/v2/cloud-platform/organizations/tier-features.md) on a paid tier.

## Description

Runs a backtest for a cloud project. While running the backtest, a progress bar shows to keep you up-to-date on the status of the backtest. After running the backtest, the resulting statistics and a link to the full results on QuantConnect are logged. You can use the `--open` option to automatically open the full results in the browser after the backtest has finished.

If you have a local copy of the cloud project, you can use the `--push` option to push local modifications to the cloud before running the backtest.

## Arguments

The `lean cloud backtest` command expects the following arguments:

| Argument | Description |
| --- | --- |
| `<project>` | The name or Id of the project for which to run a backtest. |

## Options

The `lean cloud backtest` command supports the following options:

| Option | Description |
| --- | --- |
| `--name <string>` | The name of the backtest (a random one is generated if not specified) |
| `--push` | Push local modifications to the cloud before running the backtest |
| `--open` | Automatically open the results in the browser when the backtest is finished |
| `--parameter <<string> <string>>...` | Key-value pairs to pass as backtest parameters. Values can be string, int, or float. Example: --parameter symbol AAPL --parameter period 10 --parameter threshold 0.05 |
| `--verbose` | Enable debug logging |
| `--help` | Display the help text of the `lean cloud backtest` command and exit |
