build_report
Creates a shareable report page for a backtest the user owns and returns its URL. The page carries the honesty panel, equity and drawdown curves, walk-forward folds, the gross-to-net breakdown, a month grid and the trade table, computed from the stored backtest. Use when the user asks for a report or something to share.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 'link' (default) returns the hosted URL of the report page. 'artifact' returns the whole self-contained HTML document as well, which costs considerably more tokens. 'full' builds the full strategy report and returns its link: the strategy's rules in plain English, what it did to a given capital, every trade plotted on a zoomable NIFTY chart, the evidence panel and the capital curve. 'full' is rate limited. | link |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | No | ||
| message | No | ||
| contains | No | ||
| document | No | ||
| mime_type | No | ||
| report_url | No | ||
| backtest_id | No | ||
| document_properties | No |