merton.reports.html

Render BacktestResult (or any other result) as a standalone HTML page.

Implementation is intentionally dependency-light: we build the page with plain f-string templating so users don’t need jinja2 for the basic report. When [viz] is installed, embedded SVGs of the ROC and calibration curves are included.

Functions

render_backtest_report(→ str)

Return an HTML string (and optionally write it to out_path).

Module Contents

merton.reports.html.render_backtest_report(result: merton.backtest.backtest.BacktestResult, *, title: str = 'merton backtest report', metadata: dict[str, Any] | None = None, out_path: str | pathlib.Path | None = None) str[source]

Return an HTML string (and optionally write it to out_path).