solve_portfolio_optimization
Optimize asset allocation to maximize returns while controlling risk using mean-variance analysis with customizable constraints.
Instructions
Solve portfolio optimization problems using modern portfolio theory.
This tool implements Markowitz mean-variance optimization to find optimal
asset allocations that maximize expected return while constraining risk.
Args:
assets: List of asset names
expected_returns: List of expected returns for each asset
risk_factors: List of risk factors (standard deviations) for each asset
correlation_matrix: Correlation matrix between assets
max_allocations: Optional maximum allocation limits for each asset
risk_budget: Optional maximum portfolio risk (variance)
description: Optional problem description
Returns:
Optimal portfolio weights and performance metrics
Example:
assets = ["Bonds", "Stocks", "RealEstate", "Commodities"]
expected_returns = [0.08, 0.12, 0.10, 0.15]
risk_factors = [0.02, 0.15, 0.08, 0.20]
correlation_matrix = [[1.0, 0.2, 0.3, 0.1], [0.2, 1.0, 0.6, 0.7], ...]
max_allocations = [0.4, 0.6, 0.3, 0.2]
risk_budget = 0.01
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | Yes | ||
| correlation_matrix | Yes | ||
| description | No | ||
| expected_returns | Yes | ||
| max_allocations | No | ||
| risk_budget | No | ||
| risk_factors | Yes |