ezyquant.report.SETBacktestReport.to_html#

SETBacktestReport.to_html(with_dividend=True, benchmark: DataFrame | None = None, rf=0.0, grayscale=False, title='Strategy Tearsheet', output=None, compounded=True, periods_per_year=252, download_filename='quantstats-tearsheet.html', figfmt='svg', template_path=None, match_dates=False, **kwargs)#

Generates an HTML tearsheet for strategy performance analysis.

Parameters:
  • with_dividend (bool, optional) – Include dividend values in the portfolio values, by default True.

  • benchmark (Optional[pd.DataFrame], optional) – Time-series of benchmark returns, by default is None.

  • rf (float, optional) – Risk-free rate of return, by default is 0.

  • grayscale (bool, optional) – Generate grayscale visualizations, by default False.

  • title (str, optional) – Title of the tearsheet, by default “Strategy Tearsheet”.

  • output (None, optional) – Output file name for saving the HTML tearsheet If set to None, the tearsheet will be opened in the File Explorer instead of saving to a file., by default None.

  • compounded (bool, optional) – Calculate compounded returns for performance metrics, by default True.

  • periods_per_year (int, optional) – Number of periods per year for calculating annualized metrics, by default 252.

  • download_filename (str, optional) – Output the file name HTML tearsheet, by default “quantstats-tearsheet.html”

  • figfmt (str, optional) – Format of the saved figure file, by default “svg”.

  • template_path (None, optional) – Path to the custom template file for the HTML tearsheet, by default None

  • match_dates (bool, optional) – Match the dates of strategy and benchmark returns, by default False.

Returns:

If output is None (HTML tearsheet is displayed in the browser).

Return type:

None