{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/retirementlab-app/json-schema/retirementlab-app-run-status-response-schema.json",
  "title": "RunStatusResponse",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/retirementlab-app-openapi.json#/components/schemas/RunStatusResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "withdrawal_baseline_run_id": {
      "type": "integer",
      "title": "Withdrawal Baseline Run Id"
    },
    "config_id": {
      "type": "integer",
      "title": "Config Id"
    },
    "config_name": {
      "type": "string",
      "title": "Config Name"
    },
    "label": {
      "type": "string",
      "title": "Label"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed"
      ],
      "title": "Status"
    },
    "run_kind": {
      "type": "string",
      "enum": [
        "simulation",
        "sweep",
        "grid",
        "roth_conversion_explorer"
      ],
      "title": "Run Kind",
      "default": "simulation"
    },
    "run_source": {
      "type": "string",
      "title": "Run Source",
      "default": "web"
    },
    "sweep_variable": {
      "type": "string",
      "enum": [
        "retirement_year",
        "annual_savings",
        "portfolio_preset",
        "baseline_annual_expenses",
        "initial_net_worth",
        "country",
        "claim_age",
        "bond_tilt_pp"
      ],
      "title": "Sweep Variable"
    },
    "sweep_values": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Sweep Values"
    },
    "col_enabled": {
      "type": "boolean",
      "title": "Col Enabled"
    },
    "col_adjustments": {
      "additionalProperties": {
        "type": "number"
      },
      "type": "object",
      "title": "Col Adjustments"
    },
    "sweep_target_income_id": {
      "type": "string",
      "title": "Sweep Target Income Id"
    },
    "stats": {
      "$ref": "#/$defs/RunStats"
    },
    "simulation": {
      "$ref": "#/$defs/StoredSimulationConfigPayload"
    },
    "simulation_mode": {
      "type": "string",
      "enum": [
        "monte_carlo_regime",
        "monte_carlo_iid",
        "historical"
      ],
      "title": "Simulation Mode"
    },
    "cohorts": {
      "items": {
        "$ref": "#/$defs/CohortResult"
      },
      "type": "array",
      "title": "Cohorts"
    },
    "cohort_index": {
      "items": {
        "$ref": "#/$defs/CohortIndexEntry"
      },
      "type": "array",
      "title": "Cohort Index"
    },
    "warnings": {
      "items": {
        "$ref": "#/$defs/HistoricalWarning"
      },
      "type": "array",
      "title": "Warnings"
    },
    "sweep": {
      "$ref": "#/$defs/SweepResponse"
    },
    "grid": {
      "$ref": "#/$defs/GridResult"
    },
    "roth_explorer": {
      "$ref": "#/$defs/RothConversionExplorerResponse"
    },
    "error": {
      "$ref": "#/$defs/RunError"
    },
    "runs_remaining": {
      "type": "integer",
      "title": "Runs Remaining"
    },
    "run_limit": {
      "$ref": "#/$defs/RunLimit"
    },
    "progress": {
      "$ref": "#/$defs/RunProgress"
    },
    "requested_at": {
      "type": "string",
      "format": "date-time",
      "title": "Requested At"
    },
    "compute_provenance": {
      "$ref": "#/$defs/ComputeProvenanceResponse"
    },
    "assumptions_version": {
      "type": "string",
      "title": "Assumptions Version"
    },
    "assumptions_version_state": {
      "type": "string",
      "enum": [
        "declared",
        "legacy_unverified"
      ],
      "title": "Assumptions Version State",
      "default": "legacy_unverified"
    },
    "source_assumptions_version": {
      "type": "string",
      "title": "Source Assumptions Version"
    },
    "source_assumptions_version_state": {
      "type": "string",
      "enum": [
        "declared",
        "legacy_unverified"
      ],
      "title": "Source Assumptions Version State"
    },
    "model_notice": {
      "$ref": "#/$defs/ModelNoticeResponse"
    }
  },
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "$defs": {
    "AccountAccessRulePayload": {
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "default",
            "available_now",
            "penalty_free_from",
            "locked_until"
          ],
          "title": "Mode",
          "default": "default"
        },
        "age": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Age"
        },
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "rule_of_55_eligible": {
          "type": "boolean",
          "title": "Rule Of 55 Eligible"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AccountAccessRulePayload"
    },
    "Article24ReliefFactsPayload": {
      "properties": {
        "schema_version": {
          "type": "integer",
          "title": "Schema Version",
          "default": 1
        },
        "eligibility_status": {
          "type": "string",
          "enum": [
            "unknown",
            "eligible",
            "ineligible"
          ],
          "title": "Eligibility Status",
          "default": "unknown"
        },
        "qualifying_investment_income_fraction": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Qualifying Investment Income Fraction"
        },
        "qualifying_capital_gains_fraction": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Qualifying Capital Gains Fraction"
        },
        "us_source_or_asset_qualification_confirmed": {
          "type": "boolean",
          "title": "Us Source Or Asset Qualification Confirmed"
        },
        "beneficial_ownership_confirmed": {
          "type": "boolean",
          "title": "Beneficial Ownership Confirmed"
        },
        "us_reporting_compliance_confirmed": {
          "type": "boolean",
          "title": "Us Reporting Compliance Confirmed"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "Article24ReliefFactsPayload",
      "description": "France-US tax treaty Article 24 portfolio relief facts.\n\nThese are user-confirmed simulation facts, not a determination of legal\neligibility — user-facing copy referencing this block must say \"based on\nyour inputs\" and avoid advisory terms. ``eligibility_status`` defaults to\n``\"unknown\"``, which must never silently activate relief downstream. A\nglobally diversified portfolio can contain both qualifying and\nnon-qualifying assets, so eligibility is recorded as fractions rather\nthan a single domestic/foreign flag."
    },
    "AssetReturnItemSchema": {
      "properties": {
        "asset_class_id": {
          "type": "string",
          "title": "Asset Class Id"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "weight": {
          "type": "number",
          "title": "Weight"
        },
        "return_rate": {
          "type": "number",
          "title": "Return Rate"
        },
        "return_amount": {
          "type": "number",
          "title": "Return Amount"
        }
      },
      "type": "object",
      "required": [
        "asset_class_id",
        "label",
        "weight",
        "return_rate",
        "return_amount"
      ],
      "title": "AssetReturnItemSchema"
    },
    "BaselineAdjustmentPayload": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "new_baseline": {
          "type": "number",
          "minimum": 0.0,
          "title": "New Baseline"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "derived_from": {
          "type": "string",
          "title": "Derived From"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "year",
        "new_baseline"
      ],
      "title": "BaselineAdjustmentPayload"
    },
    "CohortIndexEntry": {
      "properties": {
        "start_year": {
          "type": "integer",
          "title": "Start Year"
        },
        "scenario_index": {
          "type": "integer",
          "title": "Scenario Index"
        },
        "is_failure": {
          "type": "boolean",
          "title": "Is Failure"
        },
        "depletion_year_index": {
          "type": "integer",
          "title": "Depletion Year Index"
        },
        "yearly_ending_balances": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Yearly Ending Balances"
        }
      },
      "type": "object",
      "required": [
        "start_year",
        "is_failure"
      ],
      "title": "CohortIndexEntry",
      "description": "Lightweight per-cohort summary loaded from the historical cohort index\nartifact. Lets the UI enumerate every cohort start year (for selector\noptions and overview headlines) without pulling each cohort's full\nyear-by-year ledger. Full ledger data is loaded on demand from the\n``/runs/{run_id}/cohort/{year}`` or ``/shares/{token}/cohort/{year}``\nartifact-backed endpoints.\n\n``yearly_ending_balances`` carries the per-year ending-balance summary\nused by the overview chart so 141 cohort lines can render from the\nindex alone (one float per plan year, ~15 entries per cohort) without\nembedding the rest of the per-year ledger (taxes, withdrawals, etc.).\nDrill-down ledgers still fetch the full ``CohortResult`` from the\nartifact-backed cohort endpoint."
    },
    "CohortResult": {
      "properties": {
        "start_year": {
          "type": "integer",
          "title": "Start Year"
        },
        "is_failure": {
          "type": "boolean",
          "title": "Is Failure"
        },
        "depletion_year_index": {
          "type": "integer",
          "title": "Depletion Year Index"
        },
        "yearly": {
          "items": {
            "$ref": "#/$defs/YearDetailSchema"
          },
          "type": "array",
          "title": "Yearly"
        }
      },
      "type": "object",
      "required": [
        "start_year",
        "is_failure"
      ],
      "title": "CohortResult"
    },
    "ComponentSourceTagPayload": {
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "domestic",
            "foreign"
          ],
          "title": "Source",
          "default": "domestic"
        },
        "remitted": {
          "type": "boolean",
          "title": "Remitted",
          "default": true
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ComponentSourceTagPayload"
    },
    "ComputeProvenanceResponse": {
      "properties": {
        "contract_version": {
          "type": "integer",
          "title": "Contract Version"
        },
        "available": {
          "type": "boolean",
          "title": "Available"
        },
        "state": {
          "type": "string",
          "enum": [
            "legacy"
          ],
          "title": "State"
        },
        "result_origin": {
          "type": "string",
          "enum": [
            "computed",
            "copied"
          ],
          "title": "Result Origin"
        },
        "api_deploy_sha": {
          "type": "string",
          "title": "Api Deploy Sha"
        },
        "worker_deploy_sha": {
          "type": "string",
          "title": "Worker Deploy Sha"
        },
        "engine_contract_version": {
          "type": "string",
          "title": "Engine Contract Version"
        },
        "aggregate_result_schema_version": {
          "type": "integer",
          "title": "Aggregate Result Schema Version"
        },
        "artifact_materializer_version": {
          "type": "string",
          "title": "Artifact Materializer Version"
        },
        "artifact_schema_versions": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object",
          "title": "Artifact Schema Versions"
        },
        "python_version": {
          "type": "string",
          "title": "Python Version"
        },
        "numpy_version": {
          "type": "string",
          "title": "Numpy Version"
        },
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "architecture": {
          "type": "string",
          "title": "Architecture"
        },
        "run_kind": {
          "type": "string",
          "title": "Run Kind"
        },
        "worker_attempt_number": {
          "type": "integer",
          "title": "Worker Attempt Number"
        }
      },
      "type": "object",
      "required": [
        "contract_version",
        "available"
      ],
      "title": "ComputeProvenanceResponse"
    },
    "CrossBorderTaxFactsPayload": {
      "properties": {
        "roth_contribution_basis": {
          "type": "number",
          "minimum": 0.0,
          "title": "Roth Contribution Basis"
        },
        "qualified_roth_distribution": {
          "type": "boolean",
          "title": "Qualified Roth Distribution"
        },
        "canada_roth_election": {
          "type": "boolean",
          "title": "Canada Roth Election"
        },
        "post_residency_contribution": {
          "type": "boolean",
          "title": "Post Residency Contribution"
        },
        "payment_form": {
          "type": "string",
          "enum": [
            "lump_sum",
            "periodic"
          ],
          "title": "Payment Form"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "CrossBorderTaxFactsPayload",
      "description": "Wrapper-tax facts the simulator cannot infer from a balance.\n\nEvery field is optional: ``None`` (or absent) means the user has not\nasserted the fact yet. Empty payloads round-trip as ``None`` on the\nparent ``SimulationAccountPayload`` so existing scenarios stay\nbackwards compatible."
    },
    "DepletionMetadata": {
      "properties": {
        "p10_depleted": {
          "type": "boolean",
          "title": "P10 Depleted",
          "default": false
        },
        "p50_depleted": {
          "type": "boolean",
          "title": "P50 Depleted",
          "default": false
        },
        "p90_depleted": {
          "type": "boolean",
          "title": "P90 Depleted",
          "default": false
        }
      },
      "type": "object",
      "title": "DepletionMetadata"
    },
    "FailedRunStats": {
      "properties": {
        "returns": {
          "$ref": "#/$defs/PercentileStatsWithMax"
        },
        "ages": {
          "$ref": "#/$defs/PercentileStats"
        },
        "failure_years": {
          "$ref": "#/$defs/PercentileStats"
        },
        "failure_calendar_years": {
          "$ref": "#/$defs/PercentileStats"
        },
        "first_bad_index": {
          "type": "integer",
          "title": "First Bad Index"
        }
      },
      "type": "object",
      "required": [
        "returns",
        "ages",
        "first_bad_index"
      ],
      "title": "FailedRunStats"
    },
    "FirstYearTaxSummary": {
      "properties": {
        "median_total": {
          "type": "number",
          "title": "Median Total"
        },
        "display_basis": {
          "type": "string",
          "enum": [
            "median_first_year"
          ],
          "title": "Display Basis",
          "default": "median_first_year"
        },
        "breakdown": {
          "items": {
            "$ref": "#/$defs/FirstYearTaxSummaryLine"
          },
          "type": "array",
          "title": "Breakdown"
        }
      },
      "type": "object",
      "required": [
        "median_total"
      ],
      "title": "FirstYearTaxSummary"
    },
    "FirstYearTaxSummaryLine": {
      "properties": {
        "component": {
          "type": "string",
          "title": "Component"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "median_amount": {
          "type": "number",
          "title": "Median Amount"
        }
      },
      "type": "object",
      "required": [
        "component",
        "label",
        "median_amount"
      ],
      "title": "FirstYearTaxSummaryLine"
    },
    "FranceAssumptionResolution": {
      "properties": {
        "context": {
          "type": "string",
          "enum": [
            "personal_scenario",
            "country_sweep",
            "published_benchmark"
          ],
          "title": "Context"
        },
        "resolver_version": {
          "type": "string",
          "title": "Resolver Version"
        },
        "benchmark_pack_id": {
          "type": "string",
          "title": "Benchmark Pack Id"
        },
        "benchmark_pack_version": {
          "type": "integer",
          "title": "Benchmark Pack Version"
        },
        "primary": {
          "$ref": "#/$defs/FranceVariantReceipt"
        },
        "sensitivities": {
          "items": {
            "$ref": "#/$defs/FranceVariantReceipt"
          },
          "type": "array",
          "title": "Sensitivities"
        }
      },
      "type": "object",
      "required": [
        "context",
        "resolver_version",
        "primary"
      ],
      "title": "FranceAssumptionResolution"
    },
    "FranceEffectiveAssumption": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "value": {
          "title": "Value"
        },
        "provenance": {
          "type": "string",
          "enum": [
            "user_confirmed",
            "unresolved",
            "modeled_estimate",
            "benchmark_pack",
            "benchmark_sensitivity"
          ],
          "title": "Provenance"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        }
      },
      "type": "object",
      "required": [
        "name",
        "provenance",
        "reason"
      ],
      "title": "FranceEffectiveAssumption"
    },
    "FranceSensitivityOutcome": {
      "properties": {
        "variant": {
          "type": "string",
          "title": "Variant"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "probability_of_success": {
          "type": "number",
          "title": "Probability Of Success"
        },
        "stats": {
          "$ref": "#/$defs/FranceSensitivityStats"
        },
        "assumptions": {
          "$ref": "#/$defs/FranceVariantReceipt"
        }
      },
      "type": "object",
      "required": [
        "variant",
        "label"
      ],
      "title": "FranceSensitivityOutcome"
    },
    "FranceSensitivityStats": {
      "properties": {
        "probability_of_failure": {
          "type": "number",
          "title": "Probability Of Failure"
        },
        "success_probability": {
          "type": "number",
          "title": "Success Probability"
        },
        "net_worth": {
          "$ref": "#/$defs/PercentileStats"
        },
        "ending_portfolio": {
          "$ref": "#/$defs/PercentileStats"
        },
        "tax_rates": {
          "$ref": "#/$defs/PercentileStats"
        }
      },
      "type": "object",
      "title": "FranceSensitivityStats",
      "description": "Compact slice of a sensitivity variant's run stats.\n\nThe worker stores the sensitivity's *full* stats blob; only the handful of\naggregate figures the UI renders side by side are re-serialized here so a\nFrance run response does not carry a second copy of every sampled\ntimeline."
    },
    "FranceVariantReceipt": {
      "properties": {
        "resolver_version": {
          "type": "string",
          "title": "Resolver Version"
        },
        "context": {
          "type": "string",
          "enum": [
            "personal_scenario",
            "country_sweep",
            "published_benchmark"
          ],
          "title": "Context"
        },
        "variant": {
          "type": "string",
          "title": "Variant"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "benchmark_pack_id": {
          "type": "string",
          "title": "Benchmark Pack Id"
        },
        "benchmark_pack_version": {
          "type": "integer",
          "title": "Benchmark Pack Version"
        },
        "effective_assumptions": {
          "items": {
            "$ref": "#/$defs/FranceEffectiveAssumption"
          },
          "type": "array",
          "title": "Effective Assumptions"
        },
        "tax_policy_version": {
          "type": "string",
          "title": "Tax Policy Version"
        },
        "tax_policy_sources": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Tax Policy Sources"
        }
      },
      "type": "object",
      "required": [
        "resolver_version",
        "context",
        "variant",
        "label"
      ],
      "title": "FranceVariantReceipt",
      "description": "One resolved France run variant (primary or sensitivity)."
    },
    "GlidePathWaypointPayload": {
      "properties": {
        "age": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Age"
        },
        "allocation": {
          "items": {
            "type": "object"
          },
          "type": "array",
          "title": "Allocation"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "age",
        "allocation"
      ],
      "title": "GlidePathWaypointPayload"
    },
    "GridBounds": {
      "properties": {
        "retirement_year": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Retirement Year"
        },
        "spending": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Spending"
        },
        "savings": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Savings"
        }
      },
      "type": "object",
      "required": [
        "retirement_year",
        "spending",
        "savings"
      ],
      "title": "GridBounds"
    },
    "GridPoint": {
      "properties": {
        "retirement_year": {
          "type": "integer",
          "title": "Retirement Year"
        },
        "spending": {
          "type": "number",
          "title": "Spending"
        },
        "savings": {
          "type": "number",
          "title": "Savings"
        },
        "success_rate": {
          "type": "number",
          "title": "Success Rate"
        }
      },
      "type": "object",
      "required": [
        "retirement_year",
        "spending",
        "savings",
        "success_rate"
      ],
      "title": "GridPoint"
    },
    "GridResult": {
      "properties": {
        "grid_points": {
          "items": {
            "$ref": "#/$defs/GridPoint"
          },
          "type": "array",
          "title": "Grid Points"
        },
        "bounds": {
          "$ref": "#/$defs/GridBounds"
        },
        "base_config_hash": {
          "type": "string",
          "title": "Base Config Hash"
        },
        "computed_at": {
          "type": "string",
          "title": "Computed At"
        }
      },
      "type": "object",
      "required": [
        "grid_points",
        "bounds",
        "base_config_hash",
        "computed_at"
      ],
      "title": "GridResult"
    },
    "HistoricalWarning": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "historical_data_limited"
          ],
          "title": "Type"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "earliest_start_year": {
          "type": "integer",
          "title": "Earliest Start Year"
        },
        "latest_year": {
          "type": "integer",
          "title": "Latest Year"
        },
        "limiting_asset_class_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Limiting Asset Class Ids"
        },
        "limiting_asset_labels": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Limiting Asset Labels"
        }
      },
      "type": "object",
      "required": [
        "type",
        "message",
        "earliest_start_year",
        "latest_year"
      ],
      "title": "HistoricalWarning"
    },
    "LegacySummary": {
      "properties": {
        "heir_country": {
          "type": "string",
          "title": "Heir Country"
        },
        "median_pre_tax": {
          "type": "number",
          "title": "Median Pre Tax"
        },
        "median_tax": {
          "type": "number",
          "title": "Median Tax"
        },
        "median_post_tax": {
          "type": "number",
          "title": "Median Post Tax"
        },
        "average_pre_tax": {
          "type": "number",
          "title": "Average Pre Tax"
        },
        "average_tax": {
          "type": "number",
          "title": "Average Tax"
        },
        "average_post_tax": {
          "type": "number",
          "title": "Average Post Tax"
        },
        "pre_tax": {
          "$ref": "#/$defs/PercentileStats"
        },
        "tax": {
          "$ref": "#/$defs/PercentileStats"
        },
        "post_tax": {
          "$ref": "#/$defs/PercentileStats"
        }
      },
      "type": "object",
      "title": "LegacySummary"
    },
    "ModelNoticeResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "url": {
          "type": "string",
          "title": "Url"
        }
      },
      "type": "object",
      "required": [
        "id",
        "message",
        "url"
      ],
      "title": "ModelNoticeResponse"
    },
    "PercentileScenarios": {
      "properties": {
        "p10": {
          "type": "integer",
          "title": "P10"
        },
        "p25": {
          "type": "integer",
          "title": "P25"
        },
        "p50": {
          "type": "integer",
          "title": "P50"
        },
        "p75": {
          "type": "integer",
          "title": "P75"
        },
        "p90": {
          "type": "integer",
          "title": "P90"
        },
        "p10_depletion_year_index": {
          "type": "integer",
          "title": "P10 Depletion Year Index"
        },
        "p25_depletion_year_index": {
          "type": "integer",
          "title": "P25 Depletion Year Index"
        },
        "p50_depletion_year_index": {
          "type": "integer",
          "title": "P50 Depletion Year Index"
        },
        "p75_depletion_year_index": {
          "type": "integer",
          "title": "P75 Depletion Year Index"
        },
        "p90_depletion_year_index": {
          "type": "integer",
          "title": "P90 Depletion Year Index"
        }
      },
      "type": "object",
      "title": "PercentileScenarios",
      "description": "Scenario indices anchored to each percentile across the full run population.\n\nThe year-by-year selector uses these to switch the ledger to the actual\nP10/P25/P50/P75/P90 path, rather than approximating from the capped\n``sampled_timelines`` subset."
    },
    "PercentileStats": {
      "properties": {
        "average": {
          "type": "number",
          "title": "Average"
        },
        "p10": {
          "type": "number",
          "title": "P10"
        },
        "p50": {
          "type": "number",
          "title": "P50"
        },
        "p90": {
          "type": "number",
          "title": "P90"
        }
      },
      "type": "object",
      "title": "PercentileStats"
    },
    "PercentileStatsWithMax": {
      "properties": {
        "average": {
          "type": "number",
          "title": "Average"
        },
        "p10": {
          "type": "number",
          "title": "P10"
        },
        "p50": {
          "type": "number",
          "title": "P50"
        },
        "p90": {
          "type": "number",
          "title": "P90"
        },
        "max": {
          "type": "number",
          "title": "Max"
        }
      },
      "type": "object",
      "title": "PercentileStatsWithMax"
    },
    "PercentileTimeseriesRow": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "p10": {
          "type": "number",
          "title": "P10"
        },
        "p25": {
          "type": "number",
          "title": "P25"
        },
        "p50": {
          "type": "number",
          "title": "P50"
        },
        "p75": {
          "type": "number",
          "title": "P75"
        },
        "p90": {
          "type": "number",
          "title": "P90"
        }
      },
      "type": "object",
      "required": [
        "year",
        "p10",
        "p25",
        "p50",
        "p75",
        "p90"
      ],
      "title": "PercentileTimeseriesRow",
      "description": "One year's full-population P10/P25/P50/P75/P90 net worth."
    },
    "PumaCsmAssumptionPayload": {
      "properties": {
        "eligibility_status": {
          "type": "string",
          "enum": [
            "unknown",
            "eligible",
            "ineligible"
          ],
          "title": "Eligibility Status",
          "default": "unknown"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "PumaCsmAssumptionPayload",
      "description": "France PUMa cotisation subsidiaire maladie (CSM) eligibility assumption.\n\nA scenario-level state, separate from the per-adult\n``puma_household_adults`` entries. ``\"unknown\"`` (the default) must never\nsilently activate CSM liability downstream."
    },
    "PumaHouseholdAdultPayload": {
      "properties": {
        "household_relationship": {
          "type": "string",
          "enum": [
            "self",
            "spouse",
            "pacs_partner",
            "other_adult"
          ],
          "title": "Household Relationship",
          "default": "self"
        },
        "income_attribution": {
          "type": "string",
          "enum": [
            "per_adult",
            "equal_household"
          ],
          "title": "Income Attribution",
          "default": "per_adult"
        },
        "person": {
          "type": "string",
          "enum": [
            "A",
            "B"
          ],
          "title": "Person"
        },
        "coverage_start_date": {
          "type": "string",
          "format": "date",
          "title": "Coverage Start Date"
        },
        "coverage_end_date": {
          "type": "string",
          "format": "date",
          "title": "Coverage End Date"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "PumaHouseholdAdultPayload",
      "description": "One durable per-adult record for France PUMa/CSM liability facts.\n\n``person`` links this entry back to the existing ``person`` tag (\"A\"/\"B\")\nused on income/account rows so the CSM statutory-formula income inputs\ncan reuse already-modeled professional-income and pension facts instead\nof duplicating them here."
    },
    "RebalancingTradeSchema": {
      "properties": {
        "asset_class_id": {
          "type": "string",
          "title": "Asset Class Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "pre_weight": {
          "type": "number",
          "title": "Pre Weight"
        },
        "target_weight": {
          "type": "number",
          "title": "Target Weight"
        },
        "trade_amount": {
          "type": "number",
          "title": "Trade Amount"
        }
      },
      "type": "object",
      "required": [
        "asset_class_id",
        "name",
        "pre_weight",
        "target_weight",
        "trade_amount"
      ],
      "title": "RebalancingTradeSchema"
    },
    "RelocationEventPayload": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "to_country": {
          "type": "string",
          "title": "To Country"
        },
        "regime": {
          "type": "string",
          "title": "Regime"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "sell_primary": {
          "type": "boolean",
          "title": "Sell Primary",
          "default": false
        },
        "buy_primary_value": {
          "type": "number",
          "minimum": 0.0,
          "title": "Buy Primary Value"
        },
        "buy_primary_mortgage": {
          "type": "number",
          "minimum": 0.0,
          "title": "Buy Primary Mortgage"
        },
        "fx_rate": {
          "type": "number",
          "title": "Fx Rate"
        },
        "fx_source_currency": {
          "type": "string",
          "title": "Fx Source Currency"
        },
        "fx_destination_currency": {
          "type": "string",
          "title": "Fx Destination Currency"
        },
        "fx_assumption_source": {
          "type": "string",
          "enum": [
            "caller_supplied_fixed_rate"
          ],
          "title": "Fx Assumption Source"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "year",
        "to_country"
      ],
      "title": "RelocationEventPayload",
      "description": "Residency change at an absolute calendar year.\n\nHousing fields are captured for the relocation editor's \"Housing\"\nsub-section. They are stored but engine-unused in v1."
    },
    "RothConversionExplorerResponse": {
      "properties": {
        "baseline": {
          "$ref": "#/$defs/RothExplorerScenarioResult"
        },
        "candidates": {
          "items": {
            "$ref": "#/$defs/RothExplorerCandidate"
          },
          "type": "array",
          "title": "Candidates"
        },
        "assumptions": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Assumptions"
        },
        "warnings": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Warnings"
        }
      },
      "type": "object",
      "required": [
        "baseline",
        "candidates"
      ],
      "title": "RothConversionExplorerResponse"
    },
    "RothConversionPayload": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "amount": {
          "type": "number",
          "minimum": 0.0,
          "title": "Amount"
        },
        "from_wrapper_id": {
          "type": "string",
          "title": "From Wrapper Id"
        },
        "to_wrapper_id": {
          "type": "string",
          "title": "To Wrapper Id"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "derived_from": {
          "type": "string",
          "title": "Derived From"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "year",
        "amount",
        "from_wrapper_id",
        "to_wrapper_id"
      ],
      "title": "RothConversionPayload",
      "description": "Roth conversion event scheduled for a specific calendar year.\n\nMoves ``amount`` (real dollars at sc.initial_year) from a tax-deferred\nwrapper to a tax-free wrapper at the start of ``year``. The wrapper-bucket\nvalidation is enforced at the SimulationConfigPayload root validator so\ncross-field error messages can list the offending wrapper id."
    },
    "RothExplorerCandidate": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "request_id": {
          "type": "string",
          "title": "Request Id"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "strategy": {
          "type": "string",
          "enum": [
            "stay_below_income_cap",
            "fill_tax_bracket"
          ],
          "title": "Strategy"
        },
        "from_wrapper_id": {
          "type": "string",
          "title": "From Wrapper Id"
        },
        "to_wrapper_id": {
          "type": "string",
          "title": "To Wrapper Id"
        },
        "roth_conversions": {
          "items": {
            "$ref": "#/$defs/RothConversionPayload"
          },
          "type": "array",
          "title": "Roth Conversions"
        },
        "total_converted": {
          "type": "number",
          "title": "Total Converted"
        },
        "tax_delta": {
          "type": "number",
          "title": "Tax Delta"
        },
        "ending_balance_delta": {
          "type": "number",
          "title": "Ending Balance Delta"
        },
        "probability_of_success_delta": {
          "type": "number",
          "title": "Probability Of Success Delta"
        },
        "per_year": {
          "items": {
            "$ref": "#/$defs/RothExplorerYearDetail"
          },
          "type": "array",
          "title": "Per Year"
        }
      },
      "type": "object",
      "required": [
        "id",
        "request_id",
        "label",
        "strategy",
        "from_wrapper_id",
        "to_wrapper_id",
        "roth_conversions",
        "total_converted",
        "probability_of_success_delta"
      ],
      "title": "RothExplorerCandidate"
    },
    "RothExplorerScenarioResult": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "probability_of_success": {
          "type": "number",
          "title": "Probability Of Success"
        },
        "ending_balance": {
          "type": "number",
          "title": "Ending Balance"
        },
        "total_tax": {
          "type": "number",
          "title": "Total Tax"
        },
        "per_year": {
          "items": {
            "$ref": "#/$defs/RothExplorerYearDetail"
          },
          "type": "array",
          "title": "Per Year"
        }
      },
      "type": "object",
      "required": [
        "id",
        "label",
        "probability_of_success"
      ],
      "title": "RothExplorerScenarioResult"
    },
    "RothExplorerYearDetail": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "roth_conversion": {
          "type": "number",
          "title": "Roth Conversion"
        },
        "cumulative_converted": {
          "type": "number",
          "title": "Cumulative Converted"
        },
        "ending_balance_delta": {
          "type": "number",
          "title": "Ending Balance Delta"
        },
        "tax_delta": {
          "type": "number",
          "title": "Tax Delta"
        }
      },
      "type": "object",
      "required": [
        "year",
        "roth_conversion",
        "cumulative_converted"
      ],
      "title": "RothExplorerYearDetail"
    },
    "RunError": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "details": {
          "type": "object",
          "title": "Details"
        }
      },
      "type": "object",
      "required": [
        "message"
      ],
      "title": "RunError"
    },
    "RunLimit": {
      "properties": {
        "scope": {
          "type": "string",
          "enum": [
            "anonymous_lifetime",
            "member_daily",
            "unlimited"
          ],
          "title": "Scope"
        },
        "limit": {
          "type": "integer",
          "title": "Limit"
        },
        "used": {
          "type": "integer",
          "title": "Used"
        },
        "remaining": {
          "type": "integer",
          "title": "Remaining"
        },
        "reset_at": {
          "type": "string",
          "format": "date-time",
          "title": "Reset At"
        }
      },
      "type": "object",
      "required": [
        "scope"
      ],
      "title": "RunLimit",
      "description": "Structured run-allowance summary returned for every user.\n\n``scope`` selects which allowance applies:\n- ``anonymous_lifetime``: anonymous lifetime sign-in run cap.\n- ``member_daily``: signed-in free member's daily compute allowance.\n- ``unlimited``: Pro/pass users have no compute cap (limit/used/remaining\n  and reset_at are all null).\n\n``reset_at`` is the exact instant the daily window rolls over (member_daily\nonly) so the frontend can render it in the user's local timezone."
    },
    "RunProgress": {
      "properties": {
        "current": {
          "type": "integer",
          "title": "Current"
        },
        "total": {
          "type": "integer",
          "title": "Total"
        }
      },
      "type": "object",
      "required": [
        "current",
        "total"
      ],
      "title": "RunProgress"
    },
    "RunStats": {
      "properties": {
        "baseline_withdrawal_rate": {
          "type": "number",
          "title": "Baseline Withdrawal Rate"
        },
        "total_scenarios": {
          "type": "integer",
          "title": "Total Scenarios"
        },
        "probability_of_failure": {
          "type": "number",
          "title": "Probability Of Failure"
        },
        "minimum_ending_balance": {
          "type": "number",
          "title": "Minimum Ending Balance",
          "default": 0.0
        },
        "country": {
          "type": "string",
          "title": "Country"
        },
        "success_probability": {
          "type": "number",
          "title": "Success Probability"
        },
        "net_worth": {
          "$ref": "#/$defs/PercentileStats"
        },
        "ending_portfolio": {
          "$ref": "#/$defs/PercentileStats"
        },
        "depletion": {
          "$ref": "#/$defs/DepletionMetadata"
        },
        "returns": {
          "$ref": "#/$defs/PercentileStats"
        },
        "withdrawal_rates": {
          "$ref": "#/$defs/PercentileStats"
        },
        "tax_rates": {
          "$ref": "#/$defs/PercentileStats"
        },
        "tax_components": {
          "$ref": "#/$defs/TaxComponentStats"
        },
        "tax_summary": {
          "$ref": "#/$defs/TaxSummary"
        },
        "first_year_taxes": {
          "$ref": "#/$defs/FirstYearTaxSummary"
        },
        "tax_impact": {
          "$ref": "#/$defs/TaxImpact"
        },
        "failed_runs": {
          "$ref": "#/$defs/FailedRunStats"
        },
        "legacy": {
          "$ref": "#/$defs/LegacySummary"
        },
        "median_legacy_pre_tax": {
          "type": "number",
          "title": "Median Legacy Pre Tax"
        },
        "median_legacy_tax": {
          "type": "number",
          "title": "Median Legacy Tax"
        },
        "median_legacy_post_tax": {
          "type": "number",
          "title": "Median Legacy Post Tax"
        },
        "sampled_timelines": {
          "items": {
            "$ref": "#/$defs/SampledTimeline"
          },
          "type": "array",
          "title": "Sampled Timelines"
        },
        "percentile_scenarios": {
          "$ref": "#/$defs/PercentileScenarios"
        },
        "percentile_timeseries": {
          "items": {
            "$ref": "#/$defs/PercentileTimeseriesRow"
          },
          "type": "array",
          "title": "Percentile Timeseries"
        },
        "per_asset_simulation": {
          "type": "boolean",
          "title": "Per Asset Simulation",
          "default": false
        },
        "rebalancing_mode": {
          "type": "string",
          "title": "Rebalancing Mode"
        },
        "regime_aware": {
          "type": "boolean",
          "title": "Regime Aware",
          "default": false
        },
        "regime_summary": {
          "type": "object",
          "title": "Regime Summary"
        },
        "return_assumption_preset": {
          "type": "string",
          "title": "Return Assumption Preset"
        },
        "total_cohorts": {
          "type": "integer",
          "title": "Total Cohorts"
        },
        "succeeding_cohorts": {
          "type": "integer",
          "title": "Succeeding Cohorts"
        },
        "failing_cohorts": {
          "type": "integer",
          "title": "Failing Cohorts"
        },
        "failing_cohort_years": {
          "items": {
            "type": "integer"
          },
          "type": "array",
          "title": "Failing Cohort Years"
        },
        "worst_cohort": {
          "$ref": "#/$defs/WorstCohortStats"
        },
        "france_assumption_resolution": {
          "$ref": "#/$defs/FranceAssumptionResolution"
        },
        "france_sensitivity_outcomes": {
          "items": {
            "$ref": "#/$defs/FranceSensitivityOutcome"
          },
          "type": "array",
          "title": "France Sensitivity Outcomes"
        },
        "currency_segments": {
          "items": {
            "type": "object"
          },
          "type": "array",
          "title": "Currency Segments"
        },
        "relocation_currency_receipts": {
          "items": {
            "type": "object"
          },
          "type": "array",
          "title": "Relocation Currency Receipts"
        },
        "final_headline_currency": {
          "type": "string",
          "title": "Final Headline Currency"
        }
      },
      "type": "object",
      "required": [
        "baseline_withdrawal_rate",
        "probability_of_failure",
        "net_worth",
        "returns",
        "withdrawal_rates",
        "tax_rates",
        "failed_runs"
      ],
      "title": "RunStats"
    },
    "SampledTimeline": {
      "properties": {
        "scenario_index": {
          "type": "integer",
          "title": "Scenario Index"
        },
        "is_failure": {
          "type": "boolean",
          "title": "Is Failure"
        },
        "points": {
          "items": {
            "$ref": "#/$defs/SampledTimelinePoint"
          },
          "type": "array",
          "title": "Points"
        },
        "returns": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Returns"
        },
        "depletion_year_index": {
          "type": "integer",
          "title": "Depletion Year Index"
        },
        "cohort_start_year": {
          "type": "integer",
          "title": "Cohort Start Year"
        }
      },
      "type": "object",
      "required": [
        "scenario_index",
        "is_failure"
      ],
      "title": "SampledTimeline"
    },
    "SampledTimelinePoint": {
      "properties": {
        "year_index": {
          "type": "integer",
          "title": "Year Index"
        },
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "net_worth": {
          "type": "number",
          "title": "Net Worth"
        }
      },
      "type": "object",
      "required": [
        "year_index",
        "year",
        "net_worth"
      ],
      "title": "SampledTimelinePoint"
    },
    "SimulationAccountPayload": {
      "properties": {
        "wrapper_id": {
          "type": "string",
          "title": "Wrapper Id"
        },
        "balance": {
          "type": "number",
          "minimum": 0.0,
          "title": "Balance",
          "description": "Account balance in full local currency units."
        },
        "cost_basis": {
          "type": "number",
          "minimum": 0.0,
          "title": "Cost Basis"
        },
        "person": {
          "type": "string",
          "enum": [
            "A",
            "B"
          ],
          "title": "Person"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "cross_border_tax_facts": {
          "$ref": "#/$defs/CrossBorderTaxFactsPayload"
        },
        "withdrawal_access": {
          "$ref": "#/$defs/AccountAccessRulePayload"
        },
        "securities_holding_eligibility_override": {
          "type": "string",
          "enum": [
            "eligible",
            "ineligible"
          ],
          "title": "Securities Holding Eligibility Override"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "wrapper_id",
        "balance"
      ],
      "title": "SimulationAccountPayload"
    },
    "SimulationExpensePayload": {
      "properties": {
        "description": {
          "type": "string",
          "title": "Description"
        },
        "cost": {
          "type": "number",
          "title": "Cost",
          "description": "Expense amount in full local currency units."
        },
        "begin_year": {
          "type": "integer",
          "title": "Begin Year",
          "description": "First year the expense applies (inclusive)."
        },
        "end_year": {
          "type": "integer",
          "title": "End Year",
          "description": "Last year the expense applies (inclusive). For a single-year expense, set begin_year == end_year. The API services layer converts to the engine's half-open ``[begin, end)`` interval."
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "seeded_from": {
          "type": "string",
          "title": "Seeded From",
          "description": "Marker identifying a helper that generated this row (e.g. 'healthcare_defaults'). Absent on user-authored rows."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "description",
        "cost",
        "begin_year",
        "end_year"
      ],
      "title": "SimulationExpensePayload"
    },
    "SimulationIncomePayload": {
      "properties": {
        "description": {
          "type": "string",
          "title": "Description"
        },
        "income": {
          "type": "number",
          "title": "Income",
          "description": "Income amount in full local currency units."
        },
        "begin_year": {
          "type": "integer",
          "title": "Begin Year",
          "description": "First year the income applies (inclusive)."
        },
        "end_year": {
          "type": "integer",
          "title": "End Year",
          "description": "Last year the income applies (inclusive). For a single-year income, set begin_year == end_year. The API services layer converts to the engine's half-open ``[begin, end)`` interval."
        },
        "type": {
          "type": "string",
          "enum": [
            "employment",
            "social_security",
            "public_pension",
            "private_pension",
            "rental",
            "other",
            "asset_sale"
          ],
          "title": "Type",
          "default": "other"
        },
        "source_country": {
          "type": "string",
          "title": "Source Country"
        },
        "claim_age": {
          "type": "integer",
          "title": "Claim Age"
        },
        "benefit_source": {
          "type": "string",
          "title": "Benefit Source"
        },
        "cost_basis": {
          "type": "number",
          "minimum": 0.0,
          "title": "Cost Basis"
        },
        "person": {
          "type": "string",
          "enum": [
            "A",
            "B"
          ],
          "title": "Person"
        },
        "item_id": {
          "type": "string",
          "format": "uuid",
          "title": "Item Id"
        },
        "ss_benefit_basis_mode": {
          "type": "string",
          "enum": [
            "fra_benefit",
            "ssa_estimate_at_age",
            "already_receiving"
          ],
          "title": "Ss Benefit Basis Mode"
        },
        "ss_monthly_benefit_basis": {
          "type": "number",
          "minimum": 0.0,
          "title": "Ss Monthly Benefit Basis"
        },
        "ss_benefit_basis_age": {
          "type": "integer",
          "maximum": 80.0,
          "minimum": 50.0,
          "title": "Ss Benefit Basis Age"
        },
        "ss_fra_age": {
          "type": "integer",
          "maximum": 70.0,
          "minimum": 60.0,
          "title": "Ss Fra Age"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "description",
        "income",
        "begin_year",
        "end_year"
      ],
      "title": "SimulationIncomePayload"
    },
    "StoredSimulationConfigPayload": {
      "properties": {
        "initial_year": {
          "type": "integer",
          "title": "Initial Year"
        },
        "initial_net_worth": {
          "type": "number",
          "exclusiveMinimum": 0.0,
          "title": "Initial Net Worth",
          "description": "Starting portfolio value in full local currency units."
        },
        "baseline_annual_expenses": {
          "type": "number",
          "minimum": 0.0,
          "title": "Baseline Annual Expenses",
          "description": "Baseline annual spending in full local currency units."
        },
        "additional_expenses": {
          "items": {
            "$ref": "#/$defs/SimulationExpensePayload"
          },
          "type": "array",
          "title": "Additional Expenses"
        },
        "additional_income": {
          "items": {
            "$ref": "#/$defs/SimulationIncomePayload"
          },
          "type": "array",
          "title": "Additional Income"
        },
        "country": {
          "type": "string",
          "title": "Country"
        },
        "citizenship": {
          "type": "string",
          "title": "Citizenship",
          "default": ""
        },
        "avg_return": {
          "type": "number",
          "title": "Avg Return"
        },
        "volatility": {
          "type": "number",
          "minimum": 0.0,
          "title": "Volatility"
        },
        "approximate_yield_rate": {
          "type": "number",
          "minimum": 0.0,
          "title": "Approximate Yield Rate"
        },
        "taxable_balance": {
          "type": "number",
          "minimum": 0.0,
          "title": "Taxable Balance"
        },
        "tax_deferred_balance": {
          "type": "number",
          "minimum": 0.0,
          "title": "Tax Deferred Balance"
        },
        "tax_free_balance": {
          "type": "number",
          "minimum": 0.0,
          "title": "Tax Free Balance"
        },
        "taxable_cost_basis": {
          "type": "number",
          "minimum": 0.0,
          "title": "Taxable Cost Basis"
        },
        "accounts": {
          "items": {
            "$ref": "#/$defs/SimulationAccountPayload"
          },
          "type": "array",
          "title": "Accounts"
        },
        "withdrawal_order": {
          "type": "string",
          "enum": [
            "taxable_first",
            "tax_deferred_first",
            "tax_free_first"
          ],
          "title": "Withdrawal Order",
          "default": "taxable_first"
        },
        "tax_filing_status": {
          "type": "string",
          "enum": [
            "single",
            "married_filing_jointly",
            "head_of_household"
          ],
          "title": "Tax Filing Status",
          "default": "single"
        },
        "wealth_tax_region": {
          "type": "string",
          "title": "Wealth Tax Region",
          "default": "default"
        },
        "tax_regime": {
          "type": "string",
          "title": "Tax Regime",
          "default": "default"
        },
        "subnational_region": {
          "type": "string",
          "title": "Subnational Region",
          "default": "default"
        },
        "taxable_portfolio_source": {
          "type": "string",
          "enum": [
            "domestic",
            "foreign"
          ],
          "title": "Taxable Portfolio Source",
          "default": "domestic"
        },
        "tax_regime_years_remaining": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Tax Regime Years Remaining"
        },
        "portfolio_dividend_qualified_pct": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Portfolio Dividend Qualified Pct"
        },
        "portfolio_gains_longterm_pct": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Portfolio Gains Longterm Pct"
        },
        "primary_residence_value": {
          "type": "number",
          "minimum": 0.0,
          "title": "Primary Residence Value"
        },
        "primary_residence_debt": {
          "type": "number",
          "minimum": 0.0,
          "title": "Primary Residence Debt"
        },
        "non_portfolio_property_value": {
          "type": "number",
          "minimum": 0.0,
          "title": "Non Portfolio Property Value"
        },
        "regime_eligibility_facts": {
          "type": "object",
          "title": "Regime Eligibility Facts"
        },
        "tax_profile_extended": {
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/ComponentSourceTagPayload"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "object",
          "title": "Tax Profile Extended"
        },
        "medicare_levy_applicable": {
          "type": "boolean",
          "title": "Medicare Levy Applicable"
        },
        "super_characterization": {
          "type": "string",
          "title": "Super Characterization"
        },
        "remittance_basis": {
          "type": "boolean",
          "title": "Remittance Basis"
        },
        "tax_profile_explicit_fields": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Tax Profile Explicit Fields"
        },
        "horizon": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Horizon",
          "default": 50
        },
        "n_scenarios": {
          "type": "integer",
          "minimum": 1.0,
          "title": "N Scenarios",
          "default": 10000
        },
        "inflation": {
          "type": "number",
          "title": "Inflation",
          "default": 0.02
        },
        "tail_profile": {
          "type": "string",
          "enum": [
            "none",
            "historical",
            "severe"
          ],
          "title": "Tail Profile",
          "description": "Shape of each asset's annual returns. 'historical' (default): skew and tail weight fitted to long US histories; 'none': plain log-normal; 'severe': the heaviest stock-market tail the 1871-2024 record cannot rule out. Expected returns and volatilities are unchanged by the choice.",
          "default": "historical"
        },
        "market_turbulence": {
          "type": "string",
          "enum": [
            "calmer",
            "historical",
            "rougher"
          ],
          "title": "Market Turbulence",
          "description": "How big each year's market ups and downs are. 'historical' (default): US stock volatility over 1871-2024; 'calmer': the calmest 30-year stretch on record (1871-1900); 'rougher': the roughest (1927-1956). Scales every asset's volatility; expected compound returns are unchanged.",
          "default": "historical"
        },
        "skewness_start": {
          "type": "number",
          "title": "Skewness Start",
          "description": "Deprecated and ignored; use tail_profile.",
          "default": -1.0
        },
        "skewness_factor": {
          "type": "number",
          "minimum": 0.0,
          "title": "Skewness Factor",
          "description": "Deprecated and ignored; use tail_profile.",
          "default": 1.4
        },
        "minimum_ending_balance": {
          "type": "number",
          "minimum": 0.0,
          "title": "Minimum Ending Balance",
          "default": 0.0
        },
        "primary_heir_country": {
          "type": "string",
          "title": "Primary Heir Country"
        },
        "retirement_year": {
          "type": "integer",
          "title": "Retirement Year"
        },
        "annual_savings": {
          "type": "number",
          "minimum": 0.0,
          "title": "Annual Savings"
        },
        "age": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Age"
        },
        "plan_to_age": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Plan To Age"
        },
        "person_b_retirement_year": {
          "type": "integer",
          "title": "Person B Retirement Year"
        },
        "person_b_age": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Person B Age"
        },
        "person_b_plan_to_age": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Person B Plan To Age"
        },
        "person_labels": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Person Labels"
        },
        "portfolio_preset": {
          "type": "string",
          "title": "Portfolio Preset"
        },
        "portfolio_allocation": {
          "items": {
            "type": "object"
          },
          "type": "array",
          "title": "Portfolio Allocation"
        },
        "glide_path": {
          "items": {
            "$ref": "#/$defs/GlidePathWaypointPayload"
          },
          "type": "array",
          "title": "Glide Path"
        },
        "rebalancing_mode": {
          "type": "string",
          "enum": [
            "annual",
            "threshold",
            "none"
          ],
          "title": "Rebalancing Mode",
          "default": "annual"
        },
        "rebalancing_threshold": {
          "type": "number",
          "title": "Rebalancing Threshold",
          "default": 0.05
        },
        "regime_aware": {
          "type": "boolean",
          "title": "Regime Aware",
          "default": false
        },
        "simulation_mode": {
          "type": "string",
          "enum": [
            "monte_carlo_regime",
            "monte_carlo_iid",
            "historical"
          ],
          "title": "Simulation Mode",
          "default": "monte_carlo_iid"
        },
        "withdrawal_strategy": {
          "type": "string",
          "title": "Withdrawal Strategy",
          "default": "fixed"
        },
        "withdrawal_strategy_params": {
          "type": "object",
          "title": "Withdrawal Strategy Params"
        },
        "return_assumption_preset": {
          "type": "string",
          "title": "Return Assumption Preset",
          "default": "historical"
        },
        "return_overrides": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Return Overrides"
        },
        "aca_subsidies_enabled": {
          "type": "boolean",
          "title": "Aca Subsidies Enabled",
          "default": false
        },
        "household_size": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Household Size"
        },
        "aca_state": {
          "type": "string",
          "title": "Aca State"
        },
        "medicare_enabled": {
          "type": "boolean",
          "title": "Medicare Enabled",
          "default": false
        },
        "irmaa_enabled": {
          "type": "boolean",
          "title": "Irmaa Enabled",
          "default": false
        },
        "tax_loss_harvesting_enabled": {
          "type": "boolean",
          "title": "Tax Loss Harvesting Enabled",
          "default": false
        },
        "residency_schedule": {
          "items": {
            "type": "object"
          },
          "type": "array",
          "title": "Residency Schedule"
        },
        "relocation_events": {
          "items": {
            "$ref": "#/$defs/RelocationEventPayload"
          },
          "type": "array",
          "title": "Relocation Events"
        },
        "baseline_adjustments": {
          "items": {
            "$ref": "#/$defs/BaselineAdjustmentPayload"
          },
          "type": "array",
          "title": "Baseline Adjustments"
        },
        "roth_conversions": {
          "items": {
            "$ref": "#/$defs/RothConversionPayload"
          },
          "type": "array",
          "title": "Roth Conversions"
        },
        "article24_relief": {
          "$ref": "#/$defs/Article24ReliefFactsPayload"
        },
        "puma_csm": {
          "$ref": "#/$defs/PumaCsmAssumptionPayload"
        },
        "puma_household_adults": {
          "items": {
            "$ref": "#/$defs/PumaHouseholdAdultPayload"
          },
          "type": "array",
          "title": "Puma Household Adults"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "initial_year",
        "initial_net_worth",
        "baseline_annual_expenses",
        "additional_expenses",
        "additional_income",
        "country",
        "avg_return",
        "volatility",
        "approximate_yield_rate",
        "taxable_balance",
        "tax_deferred_balance",
        "tax_free_balance",
        "taxable_cost_basis"
      ],
      "title": "StoredSimulationConfigPayload",
      "description": "Read-side view of a stored scenario, used only in responses.\n\nScenarios saved before the cross-currency relocation contract (2026-08-17)\ncan hold a currency-changing move with no fixed rate. Serializing them\nthrough the strict write model raised, so the scenario could not even be\nopened to add the rate. This subclass replaces only the FX-hop root\nvalidator (pydantic v1 replaces a root validator of the same name), so the\neditor can load the scenario and show which move needs a rate. Every write\nand run request keeps the strict ``SimulationConfigPayload``, and the worker\nstill fails closed in ``materialize_for_execution``."
    },
    "SweepPoint": {
      "properties": {
        "variable_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ],
          "title": "Variable Value"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "probability_of_success": {
          "type": "number",
          "title": "Probability Of Success"
        },
        "stats": {
          "type": "object",
          "title": "Stats"
        },
        "simulation_currency": {
          "type": "string",
          "title": "Simulation Currency"
        },
        "currency_conversion": {
          "type": "object",
          "title": "Currency Conversion"
        },
        "applied_assumptions": {
          "type": "object",
          "title": "Applied Assumptions"
        },
        "annual_amount": {
          "type": "number",
          "title": "Annual Amount"
        },
        "france_assumption_resolution": {
          "$ref": "#/$defs/FranceAssumptionResolution"
        },
        "sensitivity_outcomes": {
          "items": {
            "$ref": "#/$defs/FranceSensitivityOutcome"
          },
          "type": "array",
          "title": "Sensitivity Outcomes"
        }
      },
      "type": "object",
      "required": [
        "variable_value",
        "label",
        "probability_of_success"
      ],
      "title": "SweepPoint"
    },
    "SweepResponse": {
      "properties": {
        "sweep_variable": {
          "type": "string",
          "enum": [
            "retirement_year",
            "annual_savings",
            "portfolio_preset",
            "baseline_annual_expenses",
            "initial_net_worth",
            "country",
            "claim_age",
            "bond_tilt_pp"
          ],
          "title": "Sweep Variable"
        },
        "current_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ],
          "title": "Current Value"
        },
        "points": {
          "items": {
            "$ref": "#/$defs/SweepPoint"
          },
          "type": "array",
          "title": "Points"
        },
        "disclaimer": {
          "type": "string",
          "title": "Disclaimer"
        }
      },
      "type": "object",
      "required": [
        "sweep_variable",
        "points"
      ],
      "title": "SweepResponse"
    },
    "TaxComponentStats": {
      "properties": {
        "income": {
          "$ref": "#/$defs/PercentileStats"
        },
        "investment_income": {
          "$ref": "#/$defs/PercentileStats"
        },
        "capital_gains": {
          "$ref": "#/$defs/PercentileStats"
        },
        "wealth": {
          "$ref": "#/$defs/PercentileStats"
        },
        "total": {
          "$ref": "#/$defs/PercentileStats"
        },
        "surcharges": {
          "$ref": "#/$defs/PercentileStats"
        }
      },
      "type": "object",
      "required": [
        "income",
        "investment_income",
        "capital_gains",
        "wealth",
        "total"
      ],
      "title": "TaxComponentStats"
    },
    "TaxImpact": {
      "properties": {
        "tax_drag": {
          "$ref": "#/$defs/PercentileStats"
        },
        "wealth_impact": {
          "$ref": "#/$defs/PercentileStats"
        },
        "safety_impact": {
          "type": "number",
          "title": "Safety Impact"
        },
        "failure_rate_with_tax": {
          "type": "number",
          "title": "Failure Rate With Tax"
        },
        "failure_rate_without_tax": {
          "type": "number",
          "title": "Failure Rate Without Tax"
        },
        "comparison_basis": {
          "type": "string",
          "title": "Comparison Basis",
          "default": "same_path_no_tax_counterfactual"
        }
      },
      "type": "object",
      "required": [
        "tax_drag",
        "wealth_impact",
        "safety_impact",
        "failure_rate_with_tax",
        "failure_rate_without_tax"
      ],
      "title": "TaxImpact"
    },
    "TaxSummary": {
      "properties": {
        "annual_average_total": {
          "type": "number",
          "title": "Annual Average Total"
        },
        "display_basis": {
          "type": "string",
          "enum": [
            "average_annual_tax_per_simulated_scenario"
          ],
          "title": "Display Basis",
          "default": "average_annual_tax_per_simulated_scenario"
        },
        "breakdown": {
          "items": {
            "$ref": "#/$defs/TaxSummaryLine"
          },
          "type": "array",
          "title": "Breakdown"
        }
      },
      "type": "object",
      "required": [
        "annual_average_total"
      ],
      "title": "TaxSummary"
    },
    "TaxSummaryLine": {
      "properties": {
        "component": {
          "type": "string",
          "title": "Component"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "annual_average_amount": {
          "type": "number",
          "title": "Annual Average Amount"
        }
      },
      "type": "object",
      "required": [
        "component",
        "label",
        "annual_average_amount"
      ],
      "title": "TaxSummaryLine"
    },
    "WorstCohortStats": {
      "properties": {
        "start_year": {
          "type": "integer",
          "title": "Start Year"
        },
        "depletion_year": {
          "type": "integer",
          "title": "Depletion Year"
        },
        "depletion_calendar_year": {
          "type": "integer",
          "title": "Depletion Calendar Year"
        }
      },
      "type": "object",
      "required": [
        "start_year",
        "depletion_year",
        "depletion_calendar_year"
      ],
      "title": "WorstCohortStats"
    },
    "YearDetailAccountBalances": {
      "properties": {
        "taxable": {
          "type": "number",
          "title": "Taxable"
        },
        "tax_deferred": {
          "type": "number",
          "title": "Tax Deferred"
        },
        "tax_free": {
          "type": "number",
          "title": "Tax Free"
        }
      },
      "type": "object",
      "required": [
        "taxable",
        "tax_deferred",
        "tax_free"
      ],
      "title": "YearDetailAccountBalances"
    },
    "YearDetailAccountSourceLine": {
      "properties": {
        "account_label": {
          "type": "string",
          "title": "Account Label"
        },
        "wrapper_id": {
          "type": "string",
          "title": "Wrapper Id"
        },
        "bucket": {
          "type": "string",
          "title": "Bucket"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "access_reason": {
          "type": "string",
          "title": "Access Reason"
        }
      },
      "type": "object",
      "required": [
        "bucket",
        "amount"
      ],
      "title": "YearDetailAccountSourceLine"
    },
    "YearDetailDualTax": {
      "properties": {
        "residency_tax": {
          "type": "number",
          "title": "Residency Tax"
        },
        "citizenship_tax": {
          "type": "number",
          "title": "Citizenship Tax"
        },
        "ftc_applied": {
          "type": "number",
          "title": "Ftc Applied"
        },
        "net_tax": {
          "type": "number",
          "title": "Net Tax"
        },
        "residency_income_tax": {
          "type": "number",
          "title": "Residency Income Tax",
          "default": 0.0
        },
        "residency_investment_income_tax": {
          "type": "number",
          "title": "Residency Investment Income Tax",
          "default": 0.0
        },
        "residency_capital_gains_tax": {
          "type": "number",
          "title": "Residency Capital Gains Tax",
          "default": 0.0
        },
        "residency_wealth_tax": {
          "type": "number",
          "title": "Residency Wealth Tax",
          "default": 0.0
        },
        "residency_surcharges": {
          "type": "number",
          "title": "Residency Surcharges",
          "default": 0.0
        },
        "citizenship_income_tax": {
          "type": "number",
          "title": "Citizenship Income Tax",
          "default": 0.0
        },
        "citizenship_investment_income_tax": {
          "type": "number",
          "title": "Citizenship Investment Income Tax",
          "default": 0.0
        },
        "citizenship_capital_gains_tax": {
          "type": "number",
          "title": "Citizenship Capital Gains Tax",
          "default": 0.0
        },
        "citizenship_wealth_tax": {
          "type": "number",
          "title": "Citizenship Wealth Tax",
          "default": 0.0
        },
        "citizenship_surcharges": {
          "type": "number",
          "title": "Citizenship Surcharges",
          "default": 0.0
        },
        "gross_french_pfu_by_component": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Gross French Pfu By Component"
        },
        "article24_credit_by_component": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Article24 Credit By Component"
        },
        "net_french_portfolio_tax": {
          "type": "number",
          "title": "Net French Portfolio Tax",
          "default": 0.0
        },
        "article24_eligibility_status": {
          "type": "string",
          "title": "Article24 Eligibility Status",
          "default": "unknown"
        }
      },
      "type": "object",
      "required": [
        "residency_tax",
        "citizenship_tax",
        "ftc_applied",
        "net_tax"
      ],
      "title": "YearDetailDualTax"
    },
    "YearDetailEarlyWithdrawalPenaltyLine": {
      "properties": {
        "amount": {
          "type": "number",
          "title": "Amount"
        }
      },
      "type": "object",
      "required": [
        "amount"
      ],
      "title": "YearDetailEarlyWithdrawalPenaltyLine",
      "description": "US 10% additional federal tax on pre-59½ tax-deferred distributions.\nSee ``specs/us-early-distribution-penalty.md``."
    },
    "YearDetailEnglobamento": {
      "properties": {
        "selection": {
          "type": "string",
          "enum": [
            "auto",
            "always",
            "never"
          ],
          "title": "Selection"
        },
        "applied": {
          "type": "string",
          "enum": [
            "englobamento",
            "autonomous"
          ],
          "title": "Applied"
        },
        "autonomous_tax": {
          "type": "number",
          "title": "Autonomous Tax"
        },
        "englobamento_tax": {
          "type": "number",
          "title": "Englobamento Tax"
        }
      },
      "type": "object",
      "required": [
        "selection",
        "applied",
        "autonomous_tax",
        "englobamento_tax"
      ],
      "title": "YearDetailEnglobamento",
      "description": "Per-year disclosure of Portugal's englobamento decision.\n\n``selection`` is the user's preference (``\"auto\"``, ``\"always\"``, or\n``\"never\"``); ``applied`` is which option the policy actually used —\n``\"englobamento\"`` (progressive aggregation) or ``\"autonomous\"`` (28%\nflat). The two ``*_tax`` fields are the alternatives so the year detail\ncan show what the other choice would have cost."
    },
    "YearDetailExitTaxLine": {
      "properties": {
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "description": {
          "type": "string",
          "title": "Description"
        }
      },
      "type": "object",
      "required": [
        "amount"
      ],
      "title": "YearDetailExitTaxLine",
      "description": "Exit-tax line for years where a relocation triggers an expatriation /\ndeemed-disposition charge. Populated by the per-country exit-tax engine\n(see ``specs/exit-tax-engine.md``); omitted when no exit tax fires."
    },
    "YearDetailExpenseChange": {
      "properties": {
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "prior_amount": {
          "type": "number",
          "title": "Prior Amount"
        },
        "new_amount": {
          "type": "number",
          "title": "New Amount"
        }
      },
      "type": "object",
      "required": [
        "reason",
        "prior_amount",
        "new_amount"
      ],
      "title": "YearDetailExpenseChange",
      "description": "Year where the active baseline expense changes (baseline-adjustment\nevent or a relocation expense adjustment fires). Carries the prior and\nnew amounts so the ledger can render a narrative change line."
    },
    "YearDetailExpenseItem": {
      "properties": {
        "description": {
          "type": "string",
          "title": "Description"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        }
      },
      "type": "object",
      "required": [
        "description",
        "amount"
      ],
      "title": "YearDetailExpenseItem"
    },
    "YearDetailIncomeItem": {
      "properties": {
        "source": {
          "type": "string",
          "title": "Source"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        }
      },
      "type": "object",
      "required": [
        "source",
        "amount"
      ],
      "title": "YearDetailIncomeItem"
    },
    "YearDetailPumaCsm": {
      "properties": {
        "eligibility_status": {
          "type": "string",
          "title": "Eligibility Status"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "adults": {
          "items": {
            "$ref": "#/$defs/YearDetailPumaCsmAdult"
          },
          "type": "array",
          "title": "Adults"
        }
      },
      "type": "object",
      "required": [
        "eligibility_status",
        "amount"
      ],
      "title": "YearDetailPumaCsm"
    },
    "YearDetailPumaCsmAdult": {
      "properties": {
        "person": {
          "type": "string",
          "title": "Person"
        },
        "relationship": {
          "type": "string",
          "title": "Relationship"
        },
        "liable": {
          "type": "boolean",
          "title": "Liable"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "assessment_income": {
          "type": "number",
          "title": "Assessment Income"
        },
        "professional_income": {
          "type": "number",
          "title": "Professional Income"
        },
        "coverage_fraction": {
          "type": "number",
          "title": "Coverage Fraction"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        }
      },
      "type": "object",
      "required": [
        "relationship",
        "liable",
        "reason",
        "assessment_income",
        "professional_income",
        "coverage_fraction",
        "amount"
      ],
      "title": "YearDetailPumaCsmAdult"
    },
    "YearDetailRmdLine": {
      "properties": {
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "account": {
          "type": "string",
          "title": "Account"
        },
        "age": {
          "type": "integer",
          "title": "Age"
        },
        "account_label": {
          "type": "string",
          "title": "Account Label"
        },
        "wrapper_id": {
          "type": "string",
          "title": "Wrapper Id"
        },
        "bucket": {
          "type": "string",
          "title": "Bucket"
        },
        "access_reason": {
          "type": "string",
          "title": "Access Reason"
        }
      },
      "type": "object",
      "required": [
        "amount"
      ],
      "title": "YearDetailRmdLine",
      "description": "Required Minimum Distribution surfaced for the year (US tax-deferred\naccounts past the RMD age). See ``specs/rmd-enforcement.md``."
    },
    "YearDetailRothConversion": {
      "properties": {
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "account_label": {
          "type": "string",
          "title": "Account Label"
        },
        "wrapper_id": {
          "type": "string",
          "title": "Wrapper Id"
        },
        "bucket": {
          "type": "string",
          "title": "Bucket"
        },
        "access_reason": {
          "type": "string",
          "title": "Access Reason"
        }
      },
      "type": "object",
      "required": [
        "amount"
      ],
      "title": "YearDetailRothConversion",
      "description": "Roth conversion line surfaced when a Roth-conversion event fires this\nyear. See ``specs/roth-conversion-event.md``."
    },
    "YearDetailSchema": {
      "properties": {
        "year": {
          "type": "integer",
          "title": "Year"
        },
        "starting_balance": {
          "type": "number",
          "title": "Starting Balance"
        },
        "starting_balances": {
          "$ref": "#/$defs/YearDetailAccountBalances"
        },
        "portfolio_return_rate": {
          "type": "number",
          "title": "Portfolio Return Rate"
        },
        "portfolio_return_amount": {
          "type": "number",
          "title": "Portfolio Return Amount"
        },
        "income": {
          "items": {
            "$ref": "#/$defs/YearDetailIncomeItem"
          },
          "type": "array",
          "title": "Income"
        },
        "income_total": {
          "type": "number",
          "title": "Income Total"
        },
        "expenses": {
          "items": {
            "$ref": "#/$defs/YearDetailExpenseItem"
          },
          "type": "array",
          "title": "Expenses"
        },
        "expenses_total": {
          "type": "number",
          "title": "Expenses Total"
        },
        "investment_yield": {
          "type": "number",
          "title": "Investment Yield"
        },
        "withdrawals": {
          "$ref": "#/$defs/YearDetailWithdrawals"
        },
        "capital_gains_realized": {
          "type": "number",
          "title": "Capital Gains Realized"
        },
        "taxes": {
          "$ref": "#/$defs/YearDetailTaxes"
        },
        "surplus_deposited": {
          "type": "number",
          "title": "Surplus Deposited"
        },
        "ending_balance": {
          "type": "number",
          "title": "Ending Balance"
        },
        "ending_balances": {
          "$ref": "#/$defs/YearDetailAccountBalances"
        },
        "cumulative_inflation": {
          "type": "number",
          "title": "Cumulative Inflation"
        },
        "asset_returns": {
          "items": {
            "$ref": "#/$defs/AssetReturnItemSchema"
          },
          "type": "array",
          "title": "Asset Returns"
        },
        "rebalancing": {
          "items": {
            "$ref": "#/$defs/RebalancingTradeSchema"
          },
          "type": "array",
          "title": "Rebalancing"
        },
        "withdrawal_strategy_name": {
          "type": "string",
          "title": "Withdrawal Strategy Name"
        },
        "withdrawal_target": {
          "type": "number",
          "title": "Withdrawal Target"
        },
        "withdrawal_floor": {
          "type": "number",
          "title": "Withdrawal Floor"
        },
        "withdrawal_ceiling": {
          "type": "number",
          "title": "Withdrawal Ceiling"
        },
        "withdrawal_baseline": {
          "type": "number",
          "title": "Withdrawal Baseline"
        },
        "guardrail_hit": {
          "type": "string",
          "title": "Guardrail Hit"
        },
        "exit_tax": {
          "$ref": "#/$defs/YearDetailExitTaxLine"
        },
        "expense_change": {
          "$ref": "#/$defs/YearDetailExpenseChange"
        },
        "rmds": {
          "items": {
            "$ref": "#/$defs/YearDetailRmdLine"
          },
          "type": "array",
          "title": "Rmds"
        },
        "roth_conversions": {
          "items": {
            "$ref": "#/$defs/YearDetailRothConversion"
          },
          "type": "array",
          "title": "Roth Conversions"
        },
        "withdrawal_sources": {
          "items": {
            "$ref": "#/$defs/YearDetailAccountSourceLine"
          },
          "type": "array",
          "title": "Withdrawal Sources"
        },
        "early_withdrawal_penalty": {
          "$ref": "#/$defs/YearDetailEarlyWithdrawalPenaltyLine"
        },
        "harvested_loss": {
          "type": "number",
          "title": "Harvested Loss",
          "default": 0.0
        },
        "puma_csm": {
          "$ref": "#/$defs/YearDetailPumaCsm"
        }
      },
      "type": "object",
      "required": [
        "year",
        "starting_balance",
        "starting_balances",
        "portfolio_return_rate",
        "portfolio_return_amount",
        "income",
        "income_total",
        "expenses",
        "expenses_total",
        "investment_yield",
        "withdrawals",
        "capital_gains_realized",
        "taxes",
        "surplus_deposited",
        "ending_balance",
        "ending_balances",
        "cumulative_inflation"
      ],
      "title": "YearDetailSchema"
    },
    "YearDetailTaxReconciliation": {
      "properties": {
        "country": {
          "type": "string",
          "title": "Country"
        },
        "yield_treatment": {
          "type": "string",
          "title": "Yield Treatment"
        },
        "yield_treatment_label": {
          "type": "string",
          "title": "Yield Treatment Label"
        },
        "used_default_assumption": {
          "type": "boolean",
          "title": "Used Default Assumption"
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/YearDetailTaxReconciliationLine"
          },
          "type": "array",
          "title": "Lines"
        }
      },
      "type": "object",
      "required": [
        "country",
        "yield_treatment",
        "yield_treatment_label",
        "used_default_assumption",
        "lines"
      ],
      "title": "YearDetailTaxReconciliation",
      "description": "Country-specific reconciliation surfaced for Canada (issue #662) so\nthe year detail can show the dividend gross-up, dividend tax credits,\ncapital-gains inclusion, and ordinary interest treatment alongside the\nheadline tax."
    },
    "YearDetailTaxReconciliationLine": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        }
      },
      "type": "object",
      "required": [
        "key",
        "label",
        "amount"
      ],
      "title": "YearDetailTaxReconciliationLine",
      "description": "One row in a country-specific taxable-income reconciliation."
    },
    "YearDetailTaxes": {
      "properties": {
        "income": {
          "type": "number",
          "title": "Income"
        },
        "investment_income": {
          "type": "number",
          "title": "Investment Income"
        },
        "capital_gains": {
          "type": "number",
          "title": "Capital Gains"
        },
        "wealth": {
          "type": "number",
          "title": "Wealth"
        },
        "surcharges": {
          "type": "number",
          "title": "Surcharges"
        },
        "total": {
          "type": "number",
          "title": "Total"
        },
        "dual_tax": {
          "$ref": "#/$defs/YearDetailDualTax"
        },
        "early_withdrawal_penalty": {
          "type": "number",
          "title": "Early Withdrawal Penalty",
          "default": 0.0
        },
        "englobamento": {
          "$ref": "#/$defs/YearDetailEnglobamento"
        },
        "reconciliation": {
          "$ref": "#/$defs/YearDetailTaxReconciliation"
        },
        "taxable_securities_gross_proceeds": {
          "type": "number",
          "title": "Taxable Securities Gross Proceeds",
          "default": 0.0
        },
        "proceeds_based_tax": {
          "type": "number",
          "title": "Proceeds Based Tax",
          "default": 0.0
        },
        "applied_simplifications": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Applied Simplifications"
        }
      },
      "type": "object",
      "required": [
        "income",
        "investment_income",
        "capital_gains",
        "wealth",
        "surcharges",
        "total"
      ],
      "title": "YearDetailTaxes"
    },
    "YearDetailWithdrawals": {
      "properties": {
        "taxable": {
          "type": "number",
          "title": "Taxable"
        },
        "tax_deferred": {
          "type": "number",
          "title": "Tax Deferred"
        },
        "tax_free": {
          "type": "number",
          "title": "Tax Free"
        },
        "total": {
          "type": "number",
          "title": "Total"
        },
        "taxable_principal": {
          "type": "number",
          "title": "Taxable Principal",
          "default": 0.0
        },
        "taxable_yield_consumed": {
          "type": "number",
          "title": "Taxable Yield Consumed",
          "default": 0.0
        }
      },
      "type": "object",
      "required": [
        "taxable",
        "tax_deferred",
        "tax_free",
        "total"
      ],
      "title": "YearDetailWithdrawals"
    }
  }
}