portfolio_combine
Combine finished runs into one portfolio book and judge it: get combined series, weights, correlations, sleeve contributions and a deflated Sharpe ratio, saved as a new run.
Instructions
Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.
Combine several finished runs into one portfolio (book) and judge it: returns the combined series, the weights actually used, the correlation matrix between sleeves, each sleeve's contribution and a deflated Sharpe ratio. The book is saved as a new run, so adversarial_check and export_tearsheet accept its run_id.
Use it for a multi-strategy or multi-market book; a single graph run covers one strategy, and analyze_dependence only measures two curves you supply. Weights at bar t use only bars before t, and the drawdown cap acts on the previous bar's equity. Nothing is re-simulated: runs must be finished in the current app session; runs in different PnL units are refused, not converted. Requires a Portfolio licence (Atelier gets a named refusal).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dd_cap | No | Drawdown at which the book is de-levered; 0 turns it off. | |
| method | No | Weighting: equal weights, volatility targeting, risk parity, or hierarchical risk parity. | equal |
| run_ids | No | Comma-separated ids of at least 2 finished runs from this app session (a unique prefix is enough). | |
| lookback | No | Trailing window in bars used to estimate weights. | |
| n_trials | No | Number of candidate sleeves to deflate the Sharpe ratio by; 0 uses the number of runs passed. | |
| dd_derisk | No | Leverage multiplier applied once dd_cap is reached. | |
| rebalance | No | Bars between two weight updates. | |
| vol_target | No | Target volatility per bar for the whole book; 0 turns it off. | |
| max_leverage | No | Upper bound on the book's leverage. |