{
  "spec": "fio",
  "spec_version": "0.3.0",
  "capabilities": {
    "profile": "full-v0"
  },
  "manifest": {
    "id": "hud-cna-reserve-factors-v30-3",
    "name": "HUD CNA Reserve for Replacement Financial Factors",
    "description": "Test reserve deposits and mortgage debt service against the pinned HUD CNA example, with annual reserve balances and minimum-balance diagnostics.",
    "workbook": {
      "uri": "hud-cna-reserve-factors-v30-3.xlsx",
      "locale": "en-US",
      "date_system": 1900
    }
  },
  "ports": [
    {
      "id": "initial_reserve",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C11"
      },
      "schema": {
        "type": "number"
      },
      "default": 466925,
      "description": "USD, nonnegative initial reserve deposit. Default 466925. Replaces source formula with trial value. Source default: 466925.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "annual_deposit_per_unit",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!E11"
      },
      "schema": {
        "type": "number"
      },
      "default": 556,
      "description": "USD/unit/year, nonnegative first-year deposit. Default 556; source example has 456 units. Source default: 556.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "initial_deposit_escalation",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C6"
      },
      "schema": {
        "type": "number"
      },
      "default": 0,
      "description": "Decimal fraction per year (0.02 = 2%). Default 0; first year uses this rate. Source default: 0.",
      "constraints": {
        "min": 0,
        "max": 1
      }
    },
    {
      "id": "deposit_change_year",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!E6"
      },
      "schema": {
        "type": "number"
      },
      "default": 1,
      "description": "Relative year, integer 1..20. Default 1; from year 2, new rate applies when year >= this value. Source default: 1.",
      "constraints": {
        "min": 1,
        "max": 20
      }
    },
    {
      "id": "new_deposit_escalation",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!G6"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.02,
      "description": "Decimal fraction per year. Default 0.02; applies from change year, except year 1 uses initial rate. Source default: 0.02.",
      "constraints": {
        "min": 0,
        "max": 1
      }
    },
    {
      "id": "mortgage_amount",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Project Info Entry'!C12"
      },
      "schema": {
        "type": "number"
      },
      "default": 20000000,
      "description": "USD principal, positive. Default 20000000. Affects amortization mitigation and debt service. Source default: 20000000.",
      "constraints": {
        "min": 0.000001
      }
    },
    {
      "id": "mortgage_coupon",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Project Info Entry'!C13"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.025,
      "description": "Decimal annual coupon, 0.025 = 2.5%. Default 0.025. Source default: 0.025.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "mortgage_years",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Project Info Entry'!C14"
      },
      "schema": {
        "type": "number"
      },
      "default": 35,
      "description": "Years, positive amortizing mortgage term. Default 35. Source default: 35.",
      "constraints": {
        "min": 0.000001
      }
    },
    {
      "id": "annual_mip",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!D32"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.0065,
      "description": "Decimal annual mortgage insurance premium. Default 0.0065. Source default: 0.0065.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "assumed_dscr",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!C18"
      },
      "schema": {
        "type": "number"
      },
      "default": 1.2,
      "description": "Dimensionless assumed debt service coverage ratio. Default 1.2; this is an assumed NOI case, not an underwritten actual NOI. Source default: 1.2."
    },
    {
      "id": "amortization_mitigation_fraction",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Project Info Entry'!C16"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.5,
      "description": "Decimal fraction 0..1 of cumulative principal allowed for mitigation. Default 0.5. Source default: 0.5.",
      "constraints": {
        "min": 0,
        "max": 1
      }
    },
    {
      "id": "required_minimum_year1",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!B9"
      },
      "schema": {
        "type": "number"
      },
      "default": 335249.58,
      "description": "USD, year-1 required minimum reserve. Default 335249.58; trial engine escalates this base with source capital-needs inflation. Source default: 335249.58.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_1",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!B7"
      },
      "schema": {
        "type": "number"
      },
      "default": 0,
      "description": "USD positive inflated withdrawal in year 1. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 0.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_2",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!C7"
      },
      "schema": {
        "type": "number"
      },
      "default": 0,
      "description": "USD positive inflated withdrawal in year 2. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 0.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_3",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!D7"
      },
      "schema": {
        "type": "number"
      },
      "default": 345094.42,
      "description": "USD positive inflated withdrawal in year 3. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 345094.42.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_4",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!E7"
      },
      "schema": {
        "type": "number"
      },
      "default": 287848.42,
      "description": "USD positive inflated withdrawal in year 4. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 287848.42.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_5",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!F7"
      },
      "schema": {
        "type": "number"
      },
      "default": 514096.82,
      "description": "USD positive inflated withdrawal in year 5. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 514096.82.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_6",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!G7"
      },
      "schema": {
        "type": "number"
      },
      "default": 473399.52,
      "description": "USD positive inflated withdrawal in year 6. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 473399.52.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_7",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!H7"
      },
      "schema": {
        "type": "number"
      },
      "default": 425964.13,
      "description": "USD positive inflated withdrawal in year 7. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 425964.13.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_8",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!I7"
      },
      "schema": {
        "type": "number"
      },
      "default": 273292.93,
      "description": "USD positive inflated withdrawal in year 8. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 273292.93.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_9",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!J7"
      },
      "schema": {
        "type": "number"
      },
      "default": 223601.16,
      "description": "USD positive inflated withdrawal in year 9. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 223601.16.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_10",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!K7"
      },
      "schema": {
        "type": "number"
      },
      "default": 357422.04,
      "description": "USD positive inflated withdrawal in year 10. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 357422.04.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_11",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!L7"
      },
      "schema": {
        "type": "number"
      },
      "default": 860042.46,
      "description": "USD positive inflated withdrawal in year 11. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 860042.46.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_12",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!M7"
      },
      "schema": {
        "type": "number"
      },
      "default": 815520.15,
      "description": "USD positive inflated withdrawal in year 12. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 815520.15.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_13",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!N7"
      },
      "schema": {
        "type": "number"
      },
      "default": 728117.64,
      "description": "USD positive inflated withdrawal in year 13. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 728117.64.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_14",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!O7"
      },
      "schema": {
        "type": "number"
      },
      "default": 276499.39,
      "description": "USD positive inflated withdrawal in year 14. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 276499.39.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_15",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!P7"
      },
      "schema": {
        "type": "number"
      },
      "default": 709668.05,
      "description": "USD positive inflated withdrawal in year 15. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 709668.05.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_16",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!Q7"
      },
      "schema": {
        "type": "number"
      },
      "default": 670075.82,
      "description": "USD positive inflated withdrawal in year 16. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 670075.82.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_17",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!R7"
      },
      "schema": {
        "type": "number"
      },
      "default": 634855.55,
      "description": "USD positive inflated withdrawal in year 17. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 634855.55.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_18",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!S7"
      },
      "schema": {
        "type": "number"
      },
      "default": 308527.36,
      "description": "USD positive inflated withdrawal in year 18. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 308527.36.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_19",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!T7"
      },
      "schema": {
        "type": "number"
      },
      "default": 169510.22,
      "description": "USD positive inflated withdrawal in year 19. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 169510.22.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "needs_year_20",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Paste Financial Sched.'!U7"
      },
      "schema": {
        "type": "number"
      },
      "default": 154090.56,
      "description": "USD positive inflated withdrawal in year 20. Default is publisher example. This is the already inflated schedule; do not apply inflation twice. Source default: 154090.56.",
      "constraints": {
        "min": 0
      }
    },
    {
      "id": "year1_reserve",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C33"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD end-year-1 reserve; signed, negative means deficit."
    },
    {
      "id": "year10_reserve",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C42"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD end-year-10 reserve; signed."
    },
    {
      "id": "year20_reserve",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C58"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD end-year-20 reserve; signed."
    },
    {
      "id": "annual_debt_service",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!D35"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD/year principal and interest plus annual MIP."
    },
    {
      "id": "assumed_case_dscr",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!H18"
      },
      "schema": {
        "type": "number"
      },
      "description": "Dimensionless resulting coverage at assumed_dscr; DSC adjustment remains source zero."
    },
    {
      "id": "first10_result",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!C17"
      },
      "schema": {
        "type": "string"
      },
      "description": "Enum PASS or FAIL for first-ten-year required-minimum test."
    },
    {
      "id": "later_result",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!E17"
      },
      "schema": {
        "type": "string"
      },
      "description": "Enum PASS or FAIL for year-11+ required-minimum test."
    },
    {
      "id": "mitigation_result",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!G17"
      },
      "schema": {
        "type": "string"
      },
      "description": "Enum PASS or FAIL for amortization mitigation; source trial test references original eTool balances in C65:C74."
    },
    {
      "id": "monthly_payment",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!D27"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD/month amortizing principal and interest."
    },
    {
      "id": "debt_service_per_unit",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'DSC Analysis'!D37"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD/unit/year debt service including MIP."
    },
    {
      "id": "annual_deposit_total",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Trial Deposits Analysis'!E12"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD/year first-year trial reserve deposit, 456 times per-unit amount."
    },
    {
      "id": "risk_additional_deposit_per_unit",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Year 11+ Risk Analysis'!G12"
      },
      "schema": {
        "type": "number"
      },
      "description": "USD/unit/year approximate additional year-1 deposit to address later shortfall; retains publisher heuristic."
    }
  ]
}
