A full quantstats-style strategy tearsheet, built entirely on qrt’s own stats/plot stack: q.plot.report. It lays out a chart column (cumulative returns, EOY returns, return distributions, rolling risk diagnostics, drawdown analysis, a monthly heatmap) alongside a table column (key metrics, EOY returns, worst drawdowns) in a single scrollable Plotly figure. Every panel is also available as a standalone chart, useful for embedding a single diagnostic in a custom layout. These code cells are executed live by Quarto every time the docs are built.
Sample data
We reuse qrt’s bundled sample datasets — AAPL as the “strategy” and SPY as the benchmark — loaded offline via q.data.datasets.load, no network dependency — sliced to the last decade (2016+):
Passing a benchmark overlays it throughout (cumulative-returns variants, EOY bars/table, monthly distribution, rolling volatility, and adds a rolling beta panel), and adds a vs. Benchmark section (Beta, Alpha, Correlation, R², Information Ratio, …) to the key metrics table. The metrics table covers the full quantstats set — grouped into Returns, Risk-Adjusted, Risk, Drawdown, Trading, Period Returns, Best / Worst, and Win Rates sections — or a condensed subset with mode="basic":
fig = q.plot.report(strategy, benchmark=benchmark, title="AAPL vs. SPY Tearsheet")fig.show()
Without a benchmark
Drop benchmark for a strategy-only tearsheet — the benchmark-relative rows (volatility-matched returns, rolling beta) are omitted automatically: