Docs / nablatensor-risk / com.nablatensor.risk

record

RiskFactor

A regulatory risk factor: the key a sensitivity is bucketed and weighted by.

The record is deliberately generic — one shape for every FRTB SA / SIMM risk class. Interpretation of name / tenor / tenor2 is per risk class; the typed factory methods below encode the conventions the FRTB SA / SIMM parameter classes expect:

  • GIRR delta: bucket = currency, name = curve id ("OIS", "3M", "INFL", "XCCY"), tenor = vertex in years.
  • GIRR vega: tenor = option maturity, tenor2 = residual maturity of the underlying.
  • CSR delta: bucket = sector/quality bucket id, name = "<issuer>|BOND" or "<issuer>|CDS", tenor = vertex in years.
  • Equity delta: spot has tenor == 0; the repo-rate factor of the same issuer has tenor > 0.
  • Commodity delta: name = "<commodity>|<location>", tenor = maturity in years.
  • FX delta: bucket = name = the currency pair.

Record components

riskClass
RiskClass
measure
RiskMeasure
bucket
String
name
String
tenor
double
tenor2
double

Constructors

RiskFactor(RiskClass riskClass, RiskMeasure measure, String bucket, String name)
RiskFactor(RiskClass riskClass, RiskMeasure measure, String bucket, String name, double tenor)

Methods

static RiskFactor equityDelta(String bucket, String name)
static RiskFactor equityVega(String bucket, String name, double tenor)
static RiskFactor equityRepoDelta(String bucket, String issuer, double tenorYears)

The equity repo-rate factor of an issuer (distinguished from spot by tenor > 0).

boolean isEquityRepo()

True for an equity repo-rate delta factor (as opposed to spot).

static RiskFactor girrDelta(String ccy, String curveId, double vertexYears)
static RiskFactor girrDelta(String ccy, double vertexYears)
static RiskFactor girrInflation(String ccy)
static RiskFactor girrXccyBasis(String ccy)
static RiskFactor girrVega(String ccy, double optionMaturityYears, double underlyingMaturityYears)
static RiskFactor csrDelta(String bucket, String issuer, CsrCurve curve, double vertexYears)
static RiskFactor csrDelta(RiskClass csrClass, String bucket, String issuer, CsrCurve curve, double vertexYears)
static RiskFactor csrVega(String bucket, String issuer, double optionMaturityYears)
String csrIssuer()

The issuer part of a CSR factor name ("<issuer>|BOND" -> "<issuer>").

String csrCurve()

The curve part of a CSR factor name ("BOND" / "CDS" / "VOL"); "" if none.

static RiskFactor commodityDelta(String bucket, String commodity, double maturityYears, String deliveryLocation)
static RiskFactor commodityVega(String bucket, String commodity, double optionMaturityYears)
String commodityName()

The commodity part of a commodity factor name ("WTI|HUB" -> "WTI").

String deliveryLocation()

The delivery-location part of a commodity factor name; "" if none.

static RiskFactor fxDelta(String currencyPair)
static RiskFactor fxVega(String currencyPair, double optionMaturityYears)
RiskFactor asCurvature()

The same factor as a curvature factor (measure CURVATURE, tenors preserved).

RiskFactor asCurvatureCurve()

A curvature factor with the tenor collapsed — one curvature factor per curve (GIRR / CSR).