{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/530amodel-com/json-schema/530amodel-com-projection-schema.json",
  "title": "Projection",
  "description": "Deterministic projection plus seeded Monte-Carlo percentile bands.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/530amodel-com-api-openapi.json#/components/schemas/Projection",
  "type": "object",
  "required": [
    "schemaVersion",
    "sourceUrl",
    "disclaimer",
    "assumptions",
    "deterministic",
    "percentiles"
  ],
  "properties": {
    "schemaVersion": {
      "type": "integer",
      "const": 1
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri"
    },
    "shareUrl": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string"
    },
    "rulesVerifiedAt": {
      "type": "string",
      "format": "date"
    },
    "assumptions": {
      "type": "object",
      "properties": {
        "annualReturn": {
          "type": "number"
        },
        "returnIsReal": {
          "type": "boolean"
        },
        "annualInflation": {
          "type": "number"
        },
        "annualFee": {
          "type": "number"
        },
        "annualVolatility": {
          "type": "number"
        },
        "mcSeed": {
          "type": "integer"
        },
        "mcPathsRequested": {
          "type": "integer"
        },
        "mcPathsSimulated": {
          "type": "integer",
          "description": "May be clamped below the requested path count to bound CPU."
        }
      }
    },
    "deterministic": {
      "type": "object",
      "properties": {
        "months": {
          "type": "integer"
        },
        "startAgeMonths": {
          "type": "integer"
        },
        "finalNominalCents": {
          "$ref": "#/$defs/CentString"
        },
        "finalRealCents": {
          "$ref": "#/$defs/CentString"
        },
        "contributedCents": {
          "$ref": "#/$defs/CentString"
        },
        "seedCents": {
          "$ref": "#/$defs/CentString"
        },
        "growthCents": {
          "$ref": "#/$defs/CentString"
        },
        "milestones": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "ageMonths": {
                "type": "integer"
              },
              "nominalCents": {
                "$ref": "#/$defs/CentString"
              },
              "realCents": {
                "$ref": "#/$defs/CentString"
              }
            }
          }
        },
        "capWarnings": {
          "type": "integer"
        }
      }
    },
    "percentiles": {
      "type": "object",
      "description": "Rows are the 10/25/50/75/90th percentiles; columns align with `ages` (months).",
      "properties": {
        "ages": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "nominalCents": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/CentString"
            }
          }
        },
        "realCents": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/CentString"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "CentString": {
      "type": "string",
      "pattern": "^-?[0-9]+$",
      "description": "Exact money amount in integer cents, serialized as a string."
    }
  }
}