|API Docs
Scenarios
Historical crisis scenarios and stress testing
GET
/api/v1/scenariosList all historical crisis scenarios
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
severity | string | No | Filter by severity: extreme, severe, moderate |
Response
{ count, scenarios: [{ id, name, period, duration, severity, recoveryMonths }] }Example
Response
{
"count": 6,
"scenarios": [
{
"id": "2008-financial-crisis",
"name": "2008 Financial Crisis",
"period": "Sep 2008 - Mar 2009",
"severity": "extreme",
"recoveryMonths": 51
}
]
}GET
/api/v1/scenarios/:idGet detailed scenario data including asset class returns
Response
{ id, name, period, duration, severity, description, returns, recoveryMonths, spxDrawdown }POST
/api/v1/scenarios/stress-testRun stress test on a portfolio allocation
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
allocation | array | Yes | Array of { name, weight } objects |
scenarioId | string | No | Specific scenario ID (tests all if omitted) |
portfolioValue | number | No | Portfolio value (default: 1000000) |
Response
{ portfolioValue, allocation, results, worstCase, bestCase }Example
Request
{
"allocation": [
{ "name": "US Equities", "weight": 60 },
{ "name": "US Bonds", "weight": 40 }
],
"portfolioValue": 1000000
}Response
{
"portfolioValue": 1000000,
"results": [
{
"scenario": { "id": "2008-financial-crisis", "name": "2008 Financial Crisis" },
"impact": { "totalReturn": -24.12, "dollarLoss": -241200, "endValue": 758800 }
}
],
"worstCase": { ... },
"bestCase": { ... }
}Templates
Pre-built allocation templates
Backtest
Historical backtesting with 30 years of data
Futures
Real-time futures market data
Allocations
Portfolio analysis and optimization