update_portfolio_weights
Modify asset allocation weights in an investment portfolio and automatically recalculate performance metrics to reflect the new distribution.
Instructions
Update the allocation weights of an existing portfolio.
Changes the weight distribution across assets in a portfolio and recalculates all metrics.
Args: name: The portfolio name. weights: New allocation weights per symbol. Must sum to 1.0.
Returns: Updated portfolio information with new metrics.
Example:
result = update_portfolio_weights(
name="tech_stocks",
weights={"GOOG": 0.5, "AMZN": 0.3, "AAPL": 0.2}
)
print(f"New Sharpe: {result['metrics']['sharpe_ratio']}")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| weights | Yes |