clone_strategies_to_portfolio
Replace a deployed (paper/live) portfolio's entire strategy set with deep copies of a source portfolio's strategy objects (by reference, not YAML). Source is a chat or deployed portfolio; the target MUST be a real deployed portfolio (chat portfolios are immutable and cannot be a target). Use this to deploy a chat portfolio's strategies onto a live/paper portfolio without re-describing them. Do NOT automatically backtest after clone — only backtest when the user asked for research validation. The source's prior backtest does not validate the target (different objects), but deploy-only asks should stop at clone/deploy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preserve_existing | No | When true, APPEND the source strategies to the target's existing strategy set instead of replacing it. Existing strategies (and their open system orders) are kept untouched — useful when the target has position-specific exit rules tied to current open positions. Defaults to false (legacy REPLACE semantics: all prior strategies are archived and their open system orders cancelled). | |
| source_portfolio_id | No | Source portfolio ID (live, paper, or chat) to copy strategies FROM. | |
| target_portfolio_id | Yes | Deployed portfolio ID (from fetch_portfolios — paper or live) whose strategy set will be REPLACED by default. Keeps its identity, brokerage, deployment, and history. Must be a real portfolio; chat portfolios are immutable and cannot be a target. |