{
  "tool_id": "art-325-tvm-irr",
  "note": "golden_hash is empty until first golden-parity.test.mjs --update. Vector 1: classic 5-flow textbook IRR problem, cross-checked against an independent reference bisection implementation (not the kernel itself) before being recorded here. Vector 2: no-sign-change bracket (all-positive flows) exercises the NO_SIGN_CHANGE_IN_BRACKET compliance flag.",
  "vectors": [
    {
      "name": "irr_textbook_5flow",
      "description": "Initial outlay -1000, then 500/400/300/100 over 4 periods. Reference bisection over [-0.9999, 10] converges to IRR = 14.488844%.",
      "policy_parameters": {
        "cash_flows": [
          {
            "amount": -1000
          },
          {
            "amount": 500
          },
          {
            "amount": 400
          },
          {
            "amount": 300
          },
          {
            "amount": 100
          }
        ]
      },
      "output_payload": {
        "irr_pct": 14.488844,
        "num_cash_flows": 5,
        "iterations": 34,
        "converged": true,
        "bracket_lo_pct": -99.99,
        "bracket_hi_pct": 1000,
        "tolerance": 1e-9,
        "method": "bisection",
        "regulatory_basis": "Standard internal rate of return, textbook definition (root of NPV as a function of the discount rate)",
        "note": "IRR solved by deterministic bisection over the declared [bracket_lo, bracket_hi] rate bracket with declared tolerance and iteration cap — never Newton/derivative-based, so no float-drift nondeterminism. Requires a sign change in NPV(bracket_lo)..NPV(bracket_hi); widen the bracket if bracket_valid is false. Equal-period cash flows only (index 0..n-1); for irregular dated flows use XIRR."
      },
      "golden_hash": "7def14c0e9f38de9fe4b45bfeff359ca291e114767962d7300c1b7a759d2e8bd"
    },
    {
      "name": "irr_no_sign_change",
      "description": "All-positive cash flows: no root exists in any bracket, so bracket_valid stays false and NO_SIGN_CHANGE_IN_BRACKET fires.",
      "policy_parameters": {
        "cash_flows": [
          {
            "amount": 100
          },
          {
            "amount": 100
          },
          {
            "amount": 100
          }
        ]
      },
      "output_payload": {
        "irr_pct": 0,
        "num_cash_flows": 3,
        "iterations": 0,
        "converged": false,
        "bracket_lo_pct": -99.99,
        "bracket_hi_pct": 1000,
        "tolerance": 1e-9,
        "method": "bisection",
        "regulatory_basis": "Standard internal rate of return, textbook definition (root of NPV as a function of the discount rate)",
        "note": "IRR solved by deterministic bisection over the declared [bracket_lo, bracket_hi] rate bracket with declared tolerance and iteration cap — never Newton/derivative-based, so no float-drift nondeterminism. Requires a sign change in NPV(bracket_lo)..NPV(bracket_hi); widen the bracket if bracket_valid is false. Equal-period cash flows only (index 0..n-1); for irregular dated flows use XIRR."
      },
      "golden_hash": "0942144f0ceb52eb3cdb316436ef12717365b9f5d84b7e38be200612f564f0cf"
    }
  ]
}
