{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bloomberg-buyside-enterprise-solutions/json-schema/bloomberg-buyside-enterprise-solutions-stress-scenario-schema.json",
  "title": "StressScenario",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bloomberg-buyside-enterprise-solutions-stress-testing-api-openapi.yml#/components/schemas/StressScenario",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Scenario identifier"
    },
    "name": {
      "type": "string",
      "description": "Scenario name"
    },
    "description": {
      "type": "string",
      "description": "Scenario description"
    },
    "category": {
      "type": "string",
      "enum": [
        "HISTORICAL",
        "RATE_SHOCK",
        "CREDIT_SHOCK",
        "EQUITY_SHOCK",
        "FX_SHOCK",
        "CUSTOM"
      ]
    },
    "historicalDate": {
      "type": "string",
      "format": "date",
      "description": "Reference date for historical scenarios"
    },
    "shocks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MarketShock"
      }
    }
  },
  "$defs": {
    "MarketShock": {
      "type": "object",
      "required": [
        "variable",
        "shockType",
        "value"
      ],
      "properties": {
        "variable": {
          "type": "string",
          "enum": [
            "INTEREST_RATE",
            "CREDIT_SPREAD",
            "EQUITY_PRICE",
            "FX_RATE",
            "VOLATILITY",
            "COMMODITY_PRICE",
            "INFLATION"
          ],
          "description": "Market variable to shock"
        },
        "shockType": {
          "type": "string",
          "enum": [
            "ABSOLUTE",
            "RELATIVE",
            "OVERRIDE"
          ],
          "description": "Type of shock to apply"
        },
        "value": {
          "type": "number",
          "description": "Shock magnitude"
        },
        "tenor": {
          "type": "string",
          "description": "Specific tenor for rate shocks (e.g., \"5Y\", \"10Y\")"
        },
        "currency": {
          "type": "string",
          "description": "Currency for the shock (ISO 4217)"
        }
      }
    }
  }
}