build_report
Turn a stored backtest into a finished, self-contained Stratify report — one HTML document with the honesty panel, equity and drawdown curves, walk-forward folds, the gross-to-net breakdown, a month grid and the trade table. PUBLISH THE RETURNED HTML VERBATIM AS AN ARTIFACT (Claude), a canvas document (ChatGPT, Gemini), or write it to a .html file (CLI clients). Do not rewrite it, summarise it into your own chart code, or regenerate the figures — the numbers in it came from the backtest, and anything you redraw from a table is a second source that can disagree with the first. It needs no network, no libraries and no build step, and it renders on light and dark. Use it when someone asks for a report, a summary they can keep, something to share, or an artifact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 'artifact' (default) returns the whole document to publish. 'link' returns only the hosted URL — far cheaper in tokens, and the right choice when the user just wants to look at it rather than keep it. 'full' builds the FULL STRATEGY REPORT and returns its link: the strategy's rules in plain English, what it did to ₹10 lakh of capital, every trade plotted on a zoomable NIFTY chart, the evidence panel, and the capital curve. Ask for it whenever someone wants to really understand a strategy rather than glance at it. It is rate limited. | |
| capital | No | format 'full' only. Starting capital in rupees. It sets the report's OPENING view — the reader can change it in the page without a new report. Default 1,000,000. | |
| risk_pct | No | format 'full' only. Size by RISK instead of margin: the percent of capital the trade is allowed to lose in its worst case (2 means 'risk 2% per trade'). Only works where the position has a bounded worst case — a naked short does not, and the call is refused with that reason rather than sized off a guess. Overrides deploy_pct. | |
| deploy_pct | No | format 'full' only. Percent of capital used as margin on any one trade. Default 10. | |
| backtest_id | Yes | From a previous run_backtest. |