# Product-specific default and terminal settlement

Run `examples/structured_workout.py` or the packaged R `run_structured_workout()` example. Four explicit synthetic 2024 claim ledgers use amounts from the corresponding product mechanisms: senior-tranche principal 80 and final recovery 25; covered-bond claim 100, prior cover payment 35 and residual estate payment 32.5; invoice claim 100, debtor recovery 40 and seller recourse 30; counterparty closeout claim 80 and recovery 32. Closed monetary losses are 55, 32.5, 30 and 48. These are separate dated illustrative positions using the recipe mechanisms, not retroactive changes to the recipe dates or borrower default probabilities.

The main claim has a known payment-delay trigger on January 16, a proposed contractual settlement extension that date, default on February 1, any interim recovery on March 1, and final settlement on May 1. The March 15 open-workout calculation cannot see the terminal cashflow or closure information known on May 1. Recovery episodes link only known cash. Settlement closure is declared separately from cure; the examples never mark an insolvent settled claim as cured. If closure knowledge is delayed beyond the evaluation cutoff, final observed LGD and the final-loss state expectation remain unidentified even if cash has already arrived.

All amounts use explicit unit FX and zero-rate economic discount factors. Covered-bond cover proceeds and debtor invoice recoveries occur before the residual reference stage; they enter known net cash exactly once. Only the remaining terminal settlement is modeled by the residual hurdle. Conditional payout size and timing are assumed independent given the reference covariates. This single-terminal-stage contract cannot be silently applied to an arbitrary sequence of future interim recoveries.

The packaged fitted residual model uses eight prior-2024 reference episodes, including two censored durations. Its complete training rows and cashflows are included. Among six resolved observations, two are cures, two have zero noncure recovery and two positive noncure ratios are 0.25 and 0.75. Thus cure mass and positive noncure mass are each 1/3. Positive log-ratio mean is log(sqrt(0.25×0.75)); its maximum-likelihood variance is (log(3)/2)^2. The independent ultimate payout-ratio oracle is [1+sqrt(0.25×0.75)×exp((log(3)/2)^2/2)]/3. The model is frozen once during data preparation; default example runs do not refit it.

The timed projection retains positive unresolved probability beyond the supplied grid. With an explicitly supplied tail discount factor 1, its final expected loss equals EAD minus known cash minus residual reference exposure times the ultimate mean ratio. Removing that assumption leaves final LGD null; it does not set remaining recovery to zero. The target's timing reference horizon is distinct from its explicitly ultimate payout horizon. These are analytical forecasts, not empirical performance claims.

Treatment cashflows are externally supplied conditional scenarios. Uptake 0.5, accepted recovery improvement 10, accepted cost 2 and offer cost 1 imply expected improvement 3. An ineligible proposed treatment remains infeasible; no contract or default state is changed. Noncounterparty examples expose the proposed fixed claim schedule. For the counterparty product, a drawn-loan schedule is individually inapplicable: its signed legal netting, collateral and margin-period closeout mechanics are exercised by `counterparty_credit_products` instead.

A complete two-state partition applies probability 0.5 to the observed conditional claim loss and zero to survival. It is an explicit illustrative physical scenario assumption, not an independently calibrated product PD. This stage supplies the default/workout recipe and part of restructuring. Survival transitions and portfolio backtests remain separate lifecycle evidence.
