We're happy to share that we've created a new backtest tear sheet creation tool, which comes with LEAN. The LEAN Report Creator is generated from backtesting-result objects and allows you to quickly create polished, professional-grade reports for each backtest (see a full example report generated by LRC). Our hope is that you can use these reports to share your strategy performance with prospective investors.

Creating a Report

The LEAN Report Creator is built in Python and is located in the new PythonToolbox. You can find a short tutorial on how to install and use it locally on GitHub. It is a command line tool which takes the json backtest result object as its input. You can run it like this: python CreateLeanReport.py--backtest=./sample.json --output=./report.html --user=data.json
Command Switch Description
--backtest Location of the source backtest json file.
--output Resulting output HTML file location.
--user Json data object for the user data of the report (see example).
Users working through the QuantConnect.com IDE can have these reports generated automatically at the end of a backtest. To generate one, look at the “Report” tab below your backtest result charts. Backtest Reports on QuantConnect.com

Report Contents

The report combines a few interpretive fields, rolling window analysis and mini-charts with windows on significant historical periods. The interpretive charts are intended to give you a set of quick Red/Green tests for your strategy.
Backtest Factor Description
Significant Period Does the backtest period cover more than five years?
Significant Trading Does the strategy perform more than 100 trades?
Diversified Do you invest in more than seven assets?
Risk Controlled Is your strategy drawdown less than 10%?
In addition to these checks, the report generator creates a number of charts for each strategy. These include the drawdown, annual returns, return histogram and asset allocation charts. Drawdown, Equity and Return Plots Often a simple, single Sharpe Ratio is not representative of the entire backtest period. Using a rolling Sharpe Ratio and Beta plots can help you to understand your performance over time. Rolling Sharpe and Beta Plots In addition, the LEAN Report Creator generates focus plots for specific, significant moments in time. When your backtest period covers one of these key events or "crisis events," we overlay the strategy returns with the algorithm benchmark. When you're using a benchmark like the S&P 500, the crisis charts can help isolate areas where your algorithm needs improvement. Focus Crisis Event Plots The full list of key or crisis events includes:
  • Dotcom Crash
  • 9-11
  • US Housing Bubble 2003
  • Lehman Brothers
  • Flash Crash
  • August 2007
  • March 2008
  • September 2008
  • 2009 Q1
  • 2009 Q2
  • US Downgrade-European Debt Crisis
  • Fukushima Melt Down 2011
  • ECB IR Event 2012
  • April 2014
  • October 2014
  • Fall 2015
  • Low Volatility Bull Market
  • GFC Crash
  • Crash Recovery
  • New Normal
Try the LEAN Report Creator out yourself on your latest backtest result!