portfolio_backtest
Backtest an account's current open positions and cash to measure historical performance. Results include equity curve, return, CAGR, volatility, Sharpe, Sortino, and drawdown over a custom period.
Instructions
Backtest the account's current open positions and cash with backtesting.py.
The universe is read from this account's SQLite positions, options without reliable continuous history are reported as skipped, and results include the equity curve, return, CAGR, volatility, Sharpe, Sortino, and drawdown. The default window is five years; request up to 36500 calendar days. This is a current-holdings retrospective, not an out-of-sample strategy test.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| start | No | ||
| account | Yes | ||
| lookback_days | No | ||
| commission_bps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |