/portfolio/optimizeAPI keyOptimize a portfolio
Core decision-support endpoint. Send constraints (capital, risk, tax rates, horizon) and receive a multi-ETF target allocation with after-tax metrics, parametric tail risk, FoF scorecard vs AOR-class funds, TLH notes, and illustrative stress. Always implements the multi-ETF book — FoF is scorecard only, never a substitute CALL.
BodyAllocatorRequestreturnsAllocatorResponse
curl -X POST https://myetfportfolio.com/v1/portfolio/optimize \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"policy_id": "taxable_low_tax",
"capital": 100000,
"risk_tolerance": "MODERATE",
"creativity": "balanced",
"account_tax_type": "taxable",
"federal": 0.24,
"state": 0.05,
"ltcg": 0.15,
"investment_horizon_years": 10
}'{
"disclaimer": "Decision support / ideas — not investment advice. ...",
"equity_pct": 60,
"bond_pct": 40,
"combined_weights": {
"SCHB": 0.27, "SCHF": 0.15, "SCHV": 0.10, "SPLV": 0.08,
"BND": 0.20, "BIV": 0.10, "BSV": 0.05, "VTIP": 0.05
},
"estimated_after_tax_return_pct": 6.85,
"estimated_portfolio_volatility_pct": 12.4,
"estimated_sortino_ratio": 0.82,
"blended_expense_ratio": 0.004,
"bond_weighted_duration": 6.2,
"tax_savings_bps": 47.0,
"efficient_frontier": [
{"equity_pct": 0.10, "volatility": 3.2, "after_tax_return": 3.1},
{"equity_pct": 0.60, "volatility": 12.4, "after_tax_return": 6.85}
],
"benchmark_comparison": {
"benchmark_symbol": "AOR",
"recommendation": "custom_portfolio",
"implementation_call": "custom_multi_etf",
"fof_scorecard": "beats_simple_fof",
"custom_portfolio_justified": true,
"matched_risk_edge_bps": 42.0,
"fee_edge_bps": 12.0
},
"tail_risk": {
"cvar_method": "parametric_multivariate_student_t_df6_portfolio_risk_simulation",
"var_95": 0.12,
"max_drawdown_kind": "path_wealth_simulation"
},
"acceptance_test_results": {"tests_passed": true}
}