Record Class FrtbSa.RiskClass

java.lang.Object
java.lang.Record
com.quantfinlib.risk.FrtbSa.RiskClass
Enclosing class:
FrtbSa

public static record FrtbSa.RiskClass(List<FrtbSa.Bucket> delta, double[][] deltaGamma, List<FrtbSa.Bucket> vega, double[][] vegaGamma, List<FrtbSa.Bucket> curvature, double[][] curvatureGamma) extends Record
One risk class: delta, vega and curvature inputs (any may be empty).
  • Constructor Details

    • RiskClass

      public RiskClass(List<FrtbSa.Bucket> delta, double[][] deltaGamma, List<FrtbSa.Bucket> vega, double[][] vegaGamma, List<FrtbSa.Bucket> curvature, double[][] curvatureGamma)
      Creates an instance of a RiskClass record class.
      Parameters:
      delta - the value for the delta record component
      deltaGamma - the value for the deltaGamma record component
      vega - the value for the vega record component
      vegaGamma - the value for the vegaGamma record component
      curvature - the value for the curvature record component
      curvatureGamma - the value for the curvatureGamma record component
  • Method Details

    • deltaGamma

      public double[][] deltaGamma()
      Returns the value of the deltaGamma record component.
      Returns:
      the value of the deltaGamma record component
    • vegaGamma

      public double[][] vegaGamma()
      Returns the value of the vegaGamma record component.
      Returns:
      the value of the vegaGamma record component
    • curvatureGamma

      public double[][] curvatureGamma()
      Returns the value of the curvatureGamma record component.
      Returns:
      the value of the curvatureGamma record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • delta

      public List<FrtbSa.Bucket> delta()
      Returns the value of the delta record component.
      Returns:
      the value of the delta record component
    • vega

      public List<FrtbSa.Bucket> vega()
      Returns the value of the vega record component.
      Returns:
      the value of the vega record component
    • curvature

      public List<FrtbSa.Bucket> curvature()
      Returns the value of the curvature record component.
      Returns:
      the value of the curvature record component