---
title: "Report"
description: "Reports provide a summary of your algorithm's performance. They outline key statistics, returns, and performance during various market crises."
canonical: https://www.quantconnect.com/docs/v2/cloud-platform/backtesting/report
markdown: https://www.quantconnect.com/docs/v2/cloud-platform/backtesting/report.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/01%20Cloud%20Platform/08%20Backtesting/06%20Report
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Report

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Cloud Platform](https://www.quantconnect.com/docs/v2/cloud-platform.md) > [Backtesting](https://www.quantconnect.com/docs/v2/cloud-platform/backtesting.md) > Report

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

[Video](https://player.vimeo.com/video/703025492)

## Introduction

Reports provide a summary of your algorithm's performance. They outline key statistics, returns, and performance during various market crises. You can generate a performance report after your backtest completes and download the report as a PDF.

## Key Statistics

The top of the backtest report displays statistics to summarize your algorithm's performance. The following table describes the key statistics in the report:

| Statistic | Description |
| --- | --- |
| Runtime Days | The number of days in the backtest or live trading period. |
| Turnover | The percentage of the algorithm's portfolio that was replaced in a given year. |
| CAGR | The annual percentage return that would be required to grow a portfolio from its starting value to its ending value. |
| Markets | The asset classes that the algorithm trades. |
| Trades per day | The total number of trades during the backtest divided by the number of days in the backtest. Trades per day is an approximation of the algorithm's trading frequency. |
| Drawdown | The largest peak to trough decline in an algorithm's equity curve. |
| Probabilistic SR | The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark. |
| Sharpe Ratio | A measure of the risk-adjusted return, developed by William Sharpe. |
| Information Ratio | The amount of excess return relative to the benchmark per unit of tracking error. |
| Strategy Capacity | The maximum amount of money an algorithm can trade before its performance degrades from market impact. Capacity is determined by the liquidity of the assets the algorithm trades and the size of positions it takes. |

## Returns

The backtest report displays charts to show the algorithm's returns per trade, per day, per month, per year, and the cumulative returns over the backtest.

### Returns per Trade

![Distribution curve of returns per trade](https://cdn.quantconnect.com/i/tu/returns-per-trade-chart.png)

This chart displays a histogram that shows the distribution of returns per trade over the backtesting period.

### Daily Returns

![Daily return time series bar chart](https://cdn.quantconnect.com/i/tu/daily-returns-chart.png)

This chart displays the returns of each day. Blue bars represent profitable days and gray bars represent unprofitable days.

### Monthly Returns

![Monthly return heat map](https://cdn.quantconnect.com/i/tu/monthly-returns-chart.png)

This chart displays the return of each month. We convert the original equity curve series into a monthly series and calculate the returns of each month. Green cells represent months with a positive return and red cells represent months with a negative return. Months that have a greater magnitude of returns are represented with darker cells. Yellow cells represent months with a relatively small gain or loss. White rectangles represent months that are not included in the backtest period. The values in the cells are percentages.

### Annual Returns

![Bar chart of annual return](https://cdn.quantconnect.com/i/tu/annual-returns-chart.png)

This chart displays the return of each year. We calculate the total return within each year and represent each year with a blue bar. The red dotted line represents the average of the annual returns.

### Cumulative Returns

![Cumulative return equity curve](https://cdn.quantconnect.com/i/tu/cumulative-returns-chart.png)

This chart displays the cumulative returns of your algorithm. The blue line represents your algorithm and the gray line represents the benchmark.

## Asset Allocation

![Asset allocation pie chart](https://cdn.quantconnect.com/i/tu/asset-allocation-chart.png)

This chart displays a time-weighted average of the absolute holdings value for each asset that entered your portfolio during the backtest. When an asset has a percentage that is too small to be shown in the pie chart, it is incorporated into an "Others" category.

## Drawdown

![Drawdown underwater line plot with analysis](https://cdn.quantconnect.com/i/tu/drawdown-chart.png)

This chart displays the peak-to-trough drawdown of your portfolio's equity throughout the backtest period. The drawdown of each day is defined as the percentage loss since the maximum equity value before the current day. The drawdowns are calculated based on daily data. The top 5 drawdown periods are marked in the chart with different colors.

## Rolling Statistics

The backtest report displays time series for your portfolio's rolling [beta](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#07-beta) and [Sharpe ratio](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#30-Sharpe-ratio).

### Rolling Portfolio Beta

![Rolling beta line chart](https://cdn.quantconnect.com/i/tu/report-rolling-beta.jpg)

This chart displays the rolling portfolio beta over trailing 6 and 12 month periods. The light blue line represents the 6 month period and the dark blue line represents the 12 month period.

### Rolling Sharpe Ratio

![Rolling Sharpe ratio line chart](https://cdn.quantconnect.com/i/tu/report-rolling-sharpe.jpg)

This chart displays the rolling portfolio Sharpe ratio over trailing 6 and 12 month periods. The light blue line represents the 6 month period and the dark blue line represents the 12 month period.

## Exposure

The backtest report displays time series for your portfolio's overall leverage and your portfolio's long-short exposure by asset class.

### Leverage

![Leverage level chart over algorithm running period](https://cdn.quantconnect.com/i/tu/report-leverage.jpg)

This chart displays your algorithm's utilization of leverage over time.

### Long-Short Exposure By Asset Class

![Long-short exposure level chart over algorithm running period](https://cdn.quantconnect.com/i/tu/report-long-short-exposure.jpg)

This chart displays your algorithm's long-short exposure by asset class over time.

## Crisis Events

![Charts of performance under crisis events](https://cdn.quantconnect.com/i/tu/crisis-events-chart.png)

This set of charts displays the cumulative returns of your algorithm and the benchmark during various historical periods. The blue line represents the cumulative returns of your algorithm and the grey line represents the cumulative return of the benchmark. The report only contains the crisis event that occurred during your algorithm's backtest period. The following table shows the crisis events that may be included in your backtest report:

| Crisis Name | Start Date | End Date |
| --- | --- | --- |
| DotCom Bubble 2000 | 2/26/2000 | 9/10/2000 |
| September 11, 2001 | 9/5/2001 | 10/10/2001 |
| U.S. Housing Bubble 2003 | 1/1/2003 | 2/20/2003 |
| Global Financial Crisis 2007 | 10/1/2007 | 12/1/2011 |
| Flash Crash 2010 | 5/1/2010 | 5/22/2010 |
| Fukushima Meltdown 2011 | 3/1/2011 | 4/22/2011 |
| U.S. Credit Downgrade 2011 | 8/5/2011 | 9/1/2011 |
| ECB IR Event 2012 | 9/5/2012 | 10/12/2012 |
| European Debt Crisis 2014 | 10/1/2014 | 10/29/2014 |
| Market Sell-Off 2015 | 8/10/2015 | 10/10/2015 |
| Recovery 2010-2012 | 1/1/2010 | 10/1/2012 |
| New Normal 2014-2019 | 1/1/2014 | 1/1/2019 |
| COVID-19 Pandemic 2020 | 2/10/2020 | 9/20/2020 |
| Post-COVID Run-up 2020-2021 | 4/1/2020 | 1/1/2022 |
| Meme Season 2021 | 1/1/2021 | 5/15/2021 |
| Russia Invades Ukraine 2022-2023 | 2/1/2022 | 1/1/2024 |
| AI Boom 2022-Present | 11/30/2022 | Present |

## Parameters

This section of the report shows the name and value of all the [parameters](https://www.quantconnect.com/docs/v2/cloud-platform/projects/structure.md#06-Parameters) in your project.

## Customize Reports

To create custom reports, customize the HTML and CSS.

### Customize the Report HTML

The [`Report / template.html`](https://github.com/QuantConnect/Lean/blob/master/Report/template.html) file in the LEAN GitHub repository defines the stucture of the reports you generate. To override the HTML file, [add a `report.html` file to your project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/files.md#03-Add-Files). To include some of the information and charts that are in the default report, use the report keys in the [`Report / ReportKey.cs`](https://github.com/QuantConnect/Lean/blob/master/Report/ReportKey.cs) file in the LEAN GitHub repository. For example, to add the [Sharpe ratio](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/glossary.md#30-Sharpe-ratio) of your backtest to the custom HTML file, use `{{$KPI-SHARPE}}`.

To include the [crisis event plots](https://www.quantconnect.com/docs/v2/cloud-platform/backtesting/report.md#08-Crisis-Events) in your report, add the `{{$HTML-CRISIS-PLOTS}}` key and then define the structure of the individual plots inside of `<!--crisis` and `crisis-->`. Inside of this comment, you can utilize the `{{$TEXT-CRISIS-TITLE}}` and `{{$PLOT-CRISIS-CONTENT}}` keys. For example, the following HTML is the default format for each crisis plot:

```
<!--crisis
<div class="col-xs-4">
    <table class="crisis-chart table compact">
        <thead>
        <tr>
            <th style="display: block; height: 75px;">{{$TEXT-CRISIS-TITLE}}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td style="padding:0;">
                <img src="{{$PLOT-CRISIS-CONTENT}}">
            </td>
        </tr>
        </tbody>
    </table>
</div>
crisis--&gt
```

To include the [algorithm parameters](https://www.quantconnect.com/docs/v2/cloud-platform/backtesting/report.md#09-Parameters) in your report, add the `{{$PARAMETERS}}` key and then define the HTML element inside of `<!--parameters` and `parameters-->`. Inside of this comment, you can use special keys `{{$KEY<parameterIndex>}}` and `{{$VALUE<parameterIndex>}}`, which represent the key and value of a single parameter. For example, the following HTML is the default format for the parameters element:

```
<!--parameters
<tr>
    <td class = "title"> {{$KEY0}} </td><td> {{$VALUE0}} </td>
    <td class = "title"> {{$KEY1}} </td><td> {{$VALUE1}} </td>
</tr>
parameters--&gt
```

In the preceding example, `{{$KEY0}}` is the name of the first parameter in the algorithm and `{{$VALUE0}}` is its value.

### Customize the Report CSS

The [`Report / css / report.css`](https://github.com/QuantConnect/Lean/blob/master/Report/css/report.css) file in the LEAN GitHub repository defines the style of the reports you generate. To override the stylesheet, [add a `report.css` file to your project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/files.md#03-Add-Files).

### Example

[Clone this project](https://www.quantconnect.com/lab/clone/25061168/92562921df687db3fc5f28f48826405c/clone-of%3A-Adaptable-Apricot-Cat) to view an example project that creates reports with custom HTML and CSS. If you backtest the strategy in the project and then generate a report, you'll notice the report has a red banner at the top.
