Docs / nablatensor-quant / com.nablatensor.credit

final class

CopulaMonteCarlo

The one-factor Gaussian copula as a recorded Monte-Carlo, so a tranche's correlation delta and its sensitivity to the pool default probability come from a single adjoint sweep — where the PortfolioLossDistribution recursion gives the price, this gives the risk.

Each path draws one systemic normal shared by every name and one idiosyncratic normal per name; a name defaults when Phi(sqrt(rho) M + sqrt(1 - rho) Z_i) < pd, monitored with a smoothed indicator so the payoff stays differentiable. The output is the discounted tranche loss to a single horizon (a protection-leg-only PV on unit tranche notional).

Methods

static BiConsumer<AadRecorder, Nabla.Inputs<CopulaMarket>> trancheLoss(double attach, double detach, int names, double lgd, double maturity, double rate, double width)
attach
tranche attachment, fraction of the pool
detach
tranche detachment
names
pool size
lgd
loss given default, fraction of one name's notional
maturity
horizon in years
rate
flat discount rate
width
smoothing width of the default indicator, in probability units (e.g. 5e-3)