{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://strategy-capacity.pages.dev/downloads/input-schema.json",
  "title": "Capacity scenario v1",
  "type": "object",
  "required": [
    "capital",
    "windowDays",
    "volumeMultiplier",
    "participationCap",
    "feeBps",
    "halfSpreadBps",
    "impactCoefficient",
    "costBudgetBps",
    "rows"
  ],
  "properties": {
    "capital": {
      "type": "number",
      "minimum": 1,
      "maximum": 1000000000000.0
    },
    "windowDays": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 252
    },
    "volumeMultiplier": {
      "type": "number",
      "minimum": 0.001,
      "maximum": 10
    },
    "participationCap": {
      "type": "number",
      "minimum": 1e-06,
      "maximum": 1
    },
    "feeBps": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000
    },
    "halfSpreadBps": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000
    },
    "impactCoefficient": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000
    },
    "costBudgetBps": {
      "type": "number",
      "minimum": 0,
      "maximum": 2000
    },
    "rows": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "required": [
          "name",
          "weight",
          "tradeFraction",
          "adv"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "tradeFraction": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "adv": {
            "type": "number",
            "minimum": 0,
            "maximum": 10000000000000.0
          }
        }
      }
    }
  },
  "$comment": "Additional semantic validation: unique trimmed names, weights sum 1 within 1e-8, positive ADV for positive trades. Percentages use fractions."
}
