Class FrtbSa.Csr

java.lang.Object
com.quantfinlib.risk.FrtbSa.Csr
Enclosing class:
FrtbSa

public static final class FrtbSa.Csr extends Object
Credit spread risk, non-securitisation (MAR21.51 to MAR21.57).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double[]
    CTP delta risk weights, buckets 1-16 (MAR21.59 Table 6).
    static final double
    Inter-bucket rating factor when IG meets HY/NR, buckets 1-15 (MAR21.57(1)).
    static final double
    Different curve (bond against CDS) (MAR21.54(3), verified).
    static final double
    CTP different-curve correlation (MAR21.60(1)).
    static final double
    Different names, buckets 1-15 (MAR21.54(1), verified).
    static final double
    Different names, index buckets 17-18 (MAR21.55(1)).
    static final double
    Different tenor (MAR21.54(2), verified).
    static final double[]
    Delta risk weights for buckets 1-18, index = bucket − 1 (MAR21.53 Table 4, verified against d457).
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    curvatureRho(boolean sameName, boolean indexBucket)
    Delta ρ to feed into curvature for CSR non-securitisation and CTP: only ρ_name applies (MAR21.100(1)); FrtbSa.curvature(List, double[][], FrtbSa.Scenario) squares it.
    static double
    gamma(int b, int c)
    Inter-bucket γ = γ_rating·γ_sector (MAR21.57). γ_rating is 50% when both buckets are in 1-15 and one is IG (1-8) while the other is HY/NR (9-15), else 1; γ_sector is Table 5.
    static double
    intraBucket(boolean sameName, boolean sameTenor, boolean sameBasis)
    Intra-bucket ρ = ρ_name·ρ_tenor·ρ_basis for buckets 1-15 (MAR21.54).
    static double
    intraBucketCtp(boolean sameName, boolean sameTenor, boolean sameBasis)
    CTP intra-bucket ρ (MAR21.60); γ is gamma(int, int) for buckets 1-16 (MAR21.61).
    static double
    intraBucketIndex(boolean sameName, boolean sameTenor, boolean sameBasis)
    Intra-bucket ρ for index buckets 17-18 (MAR21.55).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RW

      public static final double[] RW
      Delta risk weights for buckets 1-18, index = bucket − 1 (MAR21.53 Table 4, verified against d457). Covered bonds rated AA- or better may use 1.5% instead of bucket 8's 2.5% (footnote 17); that choice is the caller's.
    • RHO_NAME

      public static final double RHO_NAME
      Different names, buckets 1-15 (MAR21.54(1), verified).
      See Also:
    • RHO_NAME_INDEX

      public static final double RHO_NAME_INDEX
      Different names, index buckets 17-18 (MAR21.55(1)).
      See Also:
    • RHO_TENOR

      public static final double RHO_TENOR
      Different tenor (MAR21.54(2), verified).
      See Also:
    • RHO_BASIS

      public static final double RHO_BASIS
      Different curve (bond against CDS) (MAR21.54(3), verified).
      See Also:
    • GAMMA_RATING

      public static final double GAMMA_RATING
      Inter-bucket rating factor when IG meets HY/NR, buckets 1-15 (MAR21.57(1)).
      See Also:
    • CTP_RW

      public static final double[] CTP_RW
      CTP delta risk weights, buckets 1-16 (MAR21.59 Table 6).
    • RHO_BASIS_CTP

      public static final double RHO_BASIS_CTP
      CTP different-curve correlation (MAR21.60(1)).
      See Also:
  • Method Details

    • intraBucket

      public static double intraBucket(boolean sameName, boolean sameTenor, boolean sameBasis)
      Intra-bucket ρ = ρ_name·ρ_tenor·ρ_basis for buckets 1-15 (MAR21.54).
    • intraBucketIndex

      public static double intraBucketIndex(boolean sameName, boolean sameTenor, boolean sameBasis)
      Intra-bucket ρ for index buckets 17-18 (MAR21.55).
    • curvatureRho

      public static double curvatureRho(boolean sameName, boolean indexBucket)
      Delta ρ to feed into curvature for CSR non-securitisation and CTP: only ρ_name applies (MAR21.100(1)); FrtbSa.curvature(List, double[][], FrtbSa.Scenario) squares it.
    • gamma

      public static double gamma(int b, int c)
      Inter-bucket γ = γ_rating·γ_sector (MAR21.57). γ_rating is 50% when both buckets are in 1-15 and one is IG (1-8) while the other is HY/NR (9-15), else 1; γ_sector is Table 5. Example: buckets 1 and 10 give 0.5·0.75 = 0.375.
    • intraBucketCtp

      public static double intraBucketCtp(boolean sameName, boolean sameTenor, boolean sameBasis)
      CTP intra-bucket ρ (MAR21.60); γ is gamma(int, int) for buckets 1-16 (MAR21.61).