Docs / nablatensor-cva / com.nablatensor.cva

record

CvaMarket

The differentiable inputs a netting-set CVA is recorded against. Every component is a double, so the gradient handed back by one adjoint sweep is a CvaMarket of the same shape: r0() / hwLevel() / hwMeanReversion() / hwSigma() carry the interest-rate delta and rate-volatility sensitivity, hazardShort() / hazardMid() / hazardLong() carry the counterparty CS01 by tenor bucket, recovery() the recovery sensitivity, and the fx* components the FX delta and FX-volatility sensitivity.

Record components

r0
double
hwLevel
double
hwMeanReversion
double
hwSigma
double
hazardShort
double
hazardMid
double
hazardLong
double
recovery
double
fxSpot
double
fxVol
double
fxForeignRate
double

Methods

CvaMarket validated()
static CvaMarket demo()

A textbook single-A counterparty world: 3% rates, 150 bp CDS at 40% recovery.

CvaMarket withShortRate(double r0)
CvaMarket withHazardParallelShift(double delta)
CvaMarket withFxSpot(double fxSpot)
CvaMarket withCurveLevel(double r0, double hwLevel)
CvaMarket withRateVol(double hwSigma)
CvaMarket withHazards(double hazardShort, double hazardMid, double hazardLong)
CvaMarket withFxVol(double fxVol)
CvaMarket scale(double factor)

Every component multiplied by factor. Used to lift a gradient that was differentiated against a non-dimensionalised (money-scaled) CVA back into reporting-currency units: d(scale*CVA)/dx = scale * dCVA/dx.