get_efficient_frontier
Calculate optimal portfolio combinations by generating efficient frontier data points that show the highest expected return for each risk level.
Instructions
Generate efficient frontier data points for visualization.
Calculates points along the efficient frontier, which represents
the set of optimal portfolios offering the highest expected return
for a given level of risk.
Args:
name: The portfolio name.
num_points: Number of points to generate along the frontier.
Returns:
Dictionary containing:
- frontier_points: List of {volatility, expected_return} points
- optimal_sharpe: Maximum Sharpe ratio portfolio
- optimal_min_volatility: Minimum volatility portfolio
- individual_stocks: Individual stock positions
- current_portfolio: Current portfolio position
Example:
```
result = get_efficient_frontier(name="tech_stocks", num_points=100)
# Plot the frontier
for point in result['frontier_points']:
print(f"Vol: {point['volatility']:.2%}, Return: {point['expected_return']:.2%}")
```
Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| num_points | No |