{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://klarfort.com/tools/investment-growth-calculator/schema.json",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency",
      "enum": [
        "USD",
        "EUR",
        "GBP",
        "JPY",
        "CHF",
        "CAD",
        "AUD",
        "CNY",
        "INR",
        "MXN",
        "BRL",
        "SGD",
        "HKD",
        "SEK",
        "NOK",
        "DKK",
        "NZD",
        "ZAR",
        "KRW",
        "TRY",
        "PLN",
        "CZK",
        "HUF",
        "AED",
        "THB",
        "IDR",
        "MYR",
        "PHP"
      ],
      "default": "USD"
    },
    "principal": {
      "type": "number",
      "title": "Starting balance",
      "description": "Starting balance",
      "default": 10000,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "months": {
      "type": "integer",
      "title": "Projection months",
      "description": "Projection months",
      "default": 12,
      "minimum": 1,
      "maximum": 600
    },
    "monthlyContribution": {
      "type": "number",
      "title": "Monthly contribution",
      "description": "Monthly contribution",
      "default": 0,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "annualReturn": {
      "type": "number",
      "title": "Annual return (%)",
      "description": "Annual return (%)",
      "default": 0,
      "minimum": -99,
      "maximum": 100
    },
    "mode": {
      "type": "string",
      "title": "Displayed result",
      "description": "Displayed result",
      "enum": [
        "gross",
        "after-fee",
        "after-tax",
        "real"
      ],
      "default": "after-tax"
    },
    "monthlyWithdrawal": {
      "type": "number",
      "title": "Monthly withdrawal",
      "description": "Monthly withdrawal",
      "default": 0,
      "minimum": 0,
      "maximum": 1000000000000
    },
    "annualVolatility": {
      "type": "number",
      "title": "Annual volatility (%)",
      "description": "Annual volatility (%)",
      "default": 0,
      "minimum": 0,
      "maximum": 200
    },
    "annualFee": {
      "type": "number",
      "title": "Annual asset fee (%)",
      "description": "Annual asset fee (%)",
      "default": 0,
      "minimum": 0,
      "maximum": 100
    },
    "taxRate": {
      "type": "number",
      "title": "Tax on positive gains (%)",
      "description": "Tax on positive gains (%)",
      "default": 0,
      "minimum": 0,
      "maximum": 100
    },
    "inflationRate": {
      "type": "number",
      "title": "Annual inflation (%)",
      "description": "Annual inflation (%)",
      "default": 0,
      "minimum": -99,
      "maximum": 100
    },
    "contributionGrowth": {
      "type": "number",
      "title": "Annual contribution growth (%)",
      "description": "Annual contribution growth (%)",
      "default": 0,
      "minimum": -99,
      "maximum": 100
    },
    "paths": {
      "type": "integer",
      "title": "Simulation paths",
      "description": "Simulation paths",
      "default": 1000,
      "minimum": 1,
      "maximum": 1000
    },
    "seed": {
      "type": "string",
      "title": "Simulation seed",
      "description": "Leave empty to derive a reproducible seed from your inputs, or enter 16 hexadecimal characters.",
      "default": "",
      "pattern": "^(?:[a-fA-F0-9]{16})?$"
    }
  },
  "required": [
    "currency",
    "principal",
    "months",
    "monthlyContribution",
    "annualReturn",
    "mode",
    "monthlyWithdrawal",
    "annualVolatility",
    "annualFee",
    "taxRate",
    "inflationRate",
    "contributionGrowth",
    "paths",
    "seed"
  ]
}