monte_carlo_portfolio
ActiveTool of gapup-mcp
Pure-compute Monte Carlo portfolio simulation using Geometric Brownian Motion (GBM). Models a multi-asset portfolio across time with contributions, withdrawals, and annual rebalancing. Returns full probability distribution of terminal wealth, percentile paths, drawdown stats, and Sharpe ratio. Modes: simulate (full Monte Carlo) | glide_path (lifecycle 110-age target-date allocation) | stress_test (4 historical crises: 2008 GFC / 2000 dotcom / 1970s stagflation / 2020 COVID). No external data needed — all computed from asset assumptions. Ticker defaults built-in: SPY/VOO/VTI 7%/15%, QQQ 9%/20%, TLT/BND 3%/6%, GLD 5%/18%, BTC 30%/70%. ICP: asset managers, family offices, retail wealth advisors, robo-advisor agents, retirement planners. 10k simulations × 30 years runs in <3s on V8 JIT.
Parameters schema
{
"type": "object",
"required": [
"mode",
"assets",
"initial_investment_eur",
"horizon_years"
],
"properties": {
"mode": {
"enum": [
"simulate",
"glide_path",
"stress_test"
],
"type": "string",
"description": "simulate = full Monte Carlo GBM | glide_path = lifecycle target-date allocation | stress_test = 4 historical crisis scenarios"
},
"async": {
"type": "boolean",
"description": "If true, returns a job_id immediately (<200ms) instead of waiting for the result. Poll the result with job_result(job_id). Use for slow tools to avoid client timeouts."
},
"assets": {
"type": "array",
"items": {
"type": "object",
"required": [
"ticker",
"weight"
],
"properties": {
"ticker": {
"type": "string",
"description": "Asset ticker or identifier (e.g. SPY, QQQ, TLT, GLD, BTC, BND)."
},
"weight": {
"type": "number",
"description": "Portfolio weight (0-1). All weights must sum to 1."
},
"volatility_pct": {
"type": "number",
"description": "Annual volatility (std dev) in % (e.g. 15 for 15%). Uses ticker defaults if omitted."
},
"expected_return_pct": {
"type": "number",
"description": "Annual expected return in % (e.g. 7 for 7%). Uses ticker defaults if omitted."
}
}
},
"minItems": 1,
"description": "Portfolio assets. Weights must sum to 1.0 (auto-normalized if not)."
},
"simulations": {
"type": "number",
"maximum": 100000,
"minimum": 1000,
"description": "Number of Monte Carlo simulations (1000-100000). Default 10000."
},
"horizon_years": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "Investment horizon in years (1-50)."
},
"target_value_eur": {
"type": "number",
"description": "Target terminal portfolio value in EUR. Used to compute probability_target_achieved."
},
"confidence_intervals": {
"type": "array",
"items": {
"type": "number"
},
"description": "Percentiles to compute in the output distribution. Default [5, 25, 50, 75, 95]."
},
"initial_investment_eur": {
"type": "number",
"description": "Initial capital in EUR (e.g. 100000 for €100k)."
},
"withdrawals_annual_eur": {
"type": "number",
"description": "Annual withdrawal amount in EUR for decumulation phase (e.g. 50000 for €50k/yr)."
},
"contributions_annual_eur": {
"type": "number",
"description": "Annual contribution in EUR (e.g. 12000 for €1000/month)."
}
}
}No endpoints wrapped at confidence ≥ 0.70.
Parent server
gapup-mcp
https://github.com/getgapup/gapup-mcp-public
2/7 registries