every model spec’d & versioned · harness ✓ greenchangelog →

Docs · Model reference

equipment-lease-vs-buy

Verified · spec v1.0.0

Inputs

FieldTypeValid domain
equipmentCostfloat5,000 – 5,000,000
loanRatefloat0.02 – 0.25
loanTermMonthsint12 – 84
monthlyLeasePaymentfloat100 – 100,000
leaseTermMonthsint12 – 84
residualValuePctfloat0 – 0.6
marginalTaxRatefloat0 – 0.37
  • Costs are after-tax lifetime nominal dollars, undiscounted, and the two terms may differ — the loan-comparison time-value caveat applies. Straight-line depreciation to residual; accelerated schedules (MACRS/§179/bonus) excluded.
  • Under this contract the tax rate rescales BOTH costs by (1 − marginalTaxRate) and can never change cheaperOption — taxes flip the real decision only through deduction timing and discounting, which are excluded (see spec).

All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.

Live example — generated from the real engine

Request
POST /api/v1/models/equipment-lease-vs-buy
{
  "equipmentCost": 2503000,
  "loanRate": 0.14,
  "loanTermMonths": 48,
  "monthlyLeasePayment": 50000,
  "leaseTermMonths": 48,
  "residualValuePct": 0.3,
  "marginalTaxRate": 0.19
}
Response (chart arrays compacted)
{
  "ok": true,
  "model": "equipment-lease-vs-buy",
  "specVersion": "1.0.0",
  "contractUrl": "/api/v1/models/equipment-lease-vs-buy",
  "specUrl": "/api/v1/models/equipment-lease-vs-buy/spec",
  "inputs": {
    "equipmentCost": 2503000,
    "loanRate": 0.14,
    "loanTermMonths": 48,
    "monthlyLeasePayment": 50000,
    "leaseTermMonths": 48,
    "residualValuePct": 0.3,
    "marginalTaxRate": 0.19
  },
  "outputs": {
    "monthlyLoanPayment": 68398.17066710221,
    "totalBuyOutlay": 3283112.192020906,
    "totalInterest": 780112.1920209061,
    "residualValue": 750900,
    "netBuyCostPreTax": 2532212.192020906,
    "afterTaxBuyCost": 2051091.875536934,
    "totalLeaseOutlay": 2400000,
    "afterTaxLeaseCost": 1944000.0000000002,
    "cheaperOption": "lease",
    "afterTaxSavings": 107091.87553693377
  },
  "sentinels": [],
  "assumptions": [
    "Implements model spec equipment-lease-vs-buy v1.0.0 (dual-implementation verified).",
    "Costs are after-tax lifetime nominal dollars, undiscounted, and the two terms may differ — the loan-comparison time-value caveat applies. Straight-line depreciation to residual; accelerated schedules (MACRS/§179/bonus) excluded.",
    "Under this contract the tax rate rescales BOTH costs by (1 − marginalTaxRate) and can never change cheaperOption — taxes flip the real decision only through deduction timing and discounting, which are excluded (see spec)."
  ],
  "facts": [],
  "record": {
    "sha256": "2f34e5adf3cf3bbbcd20c195aa80db2f410755552a3be155870c1d666770ccb3",
    "fields": [
      "model",
      "specVersion",
      "inputs",
      "outputs"
    ],
    "howToVerify": "Store this record with any advice or agent output built on these numbers. To verify later: build {model, specVersion, inputs, outputs} from the stored response, serialize as JSON with object keys sorted recursively (no whitespace), and SHA-256 it — a match proves the numbers came from this spec version with these inputs, unaltered."
  },
  "disclaimer": "Illustrative planning model, not financial advice. Outputs follow the published model spec exactly; read the spec for assumptions and exclusions before relying on any number."
}

This example is executed against the production engine when the page builds — it cannot drift from the API's real behavior.