Docs / nablatensor-risk / com.nablatensor.risk

final class

NestedAggregation

The two-level correlation aggregation at the heart of FRTB SA-SBM and ISDA SIMM: weight each sensitivity, aggregate within a bucket with a correlation matrix, aggregate the bucket totals with a second matrix.

WS_k  = RW_k * s_k                 (delta / vega;  curvature feeds CVR_k directly)
K_b   = sqrt(max(0, sum_k D(WS_k) + sum_{k!=l} R(rho_kl) WS_k WS_l psi_kl))
S_b   = clamp(sum_k WS_k, -K_b, K_b)
total = sqrt(max(0, sum_b K_b^2 + sum_{b!=c} R(gamma_bc) S_b S_c psi_bc))

where for delta / vega D(w)=w^2, R(c)=c, psi=1; for curvature D(w)=max(w,0)^2, R(c)=c^2, and psi(a,b)=0 iff both are negative.

Methods

static NestedAggregation delta(RiskWeight rw, WithinBucketCorrelation rho, AcrossBucketCorrelation gamma)
static NestedAggregation curvature(WithinBucketCorrelation rho, AcrossBucketCorrelation gamma)
NestedAggregation withConcentration(ConcentrationFactor cr)

Adds the SIMM concentration risk factor CR_k: it scales every weighted sensitivity and multiplies the within-bucket cross terms by f_kl = min(CR_k,CR_l)/max(CR_k,CR_l). The across-bucket g_bc correction is treated as 1 in this slice.

Result aggregate(Sensitivities bucketed)
bucketed
sensitivities already restricted to one risk class and one measure