Raw schema
{
"type": "object",
"properties": {
"positions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Z0-9.^-]{1,10}$",
"description": "Ticker symbol, e.g. AAPL or MSFT. Must be uppercase, 1-10 characters."
},
"quantity": {
"type": "number",
"description": "Number of shares held. Use a negative value to represent a short position."
},
"cost_basis": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0
},
{
"type": "null"
}
],
"description": "Per-share cost basis in USD. Optional — used only for P&L calculations."
}
},
"required": [
"ticker",
"quantity"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500,
"description": "Array of portfolio positions. Free tier: max 20 positions and historical scenarios only. Paid tier: up to 500 positions plus custom shocks."
},
"scenarios": {
"type": "array",
"items": {
"type": "string",
"enum": [
"gfc_2008",
"covid_2020",
"dot_com_2000",
"black_monday_1987",
"taper_tantrum_2013",
"rate_hike_2022",
"volmageddon_2018",
"euro_crisis_2011"
]
},
"default": [
"gfc_2008",
"covid_2020"
],
"description": "Historical scenarios to run. Available values: gfc_2008, covid_2020, dot_com_2000, black_monday_1987, taper_tantrum_2013, rate_hike_2022, volmageddon_2018, euro_crisis_2011. Default: [gfc_2008, covid_2020]."
},
"custom_shocks": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Name for this custom scenario, e.g. 'Rate spike +300bps'. 1-50 characters."
},
"ticker_shocks": {
"type": "object",
"additionalProperties": {
"type": "number",
"minimum": -1,
"maximum": 1
},
"description": "Per-ticker price shocks as decimals, e.g. { AAPL: -0.20 } = AAPL drops 20%. Range: -1.0 to 1.0."
},
"sector_shocks": {
"type": "object",
"additionalProperties": {
"type": "number",
"minimum": -1,
"maximum": 1
},
"description": "Per-sector shocks applied to all positions in that sector. e.g. { Technology: -0.15 }. Range: -1.0 to 1.0."
},
"market_shock": {
"type": "number",
"minimum": -1,
"maximum": 1,
"description": "Broad market shock applied to all positions not covered by ticker_shocks or sector_shocks. e.g. -0.10 = market down 10%. Range: -1.0 to 1.0."
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
{
"type": "null"
}
],
"description": "Custom shock definitions. PAID tier only. Each shock specifies ticker-level, sector-level, or market-wide price changes."
}
},
"required": [
"positions"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}