set_allocations
Set the target allocation of stock and cash for an investment strategy. Both values must sum to approximately 1.0.
Instructions
Update the strategy's target stock/cash allocation ratio. The two values must sum to ≈1.0; schema validation rejects and rolls back any write that would corrupt the strategy file.
Use when the user says e.g. "set my target to 70% stock / 30% cash".
Args: target_allocation_stock: Stock weight in [0, 1], e.g. 0.7. target_allocation_cash: Cash weight in [0, 1], e.g. 0.3.
Returns: The updated allocation, or {"status": "error", "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_allocation_cash | Yes | Cash weight in [0, 1], e.g. 0.3. Must sum to ~1.0 with stock. | |
| target_allocation_stock | Yes | Stock weight in [0, 1], e.g. 0.7. Must sum to ~1.0 with cash. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |