Record Class VolatilityDecomposition.Decomposition

java.lang.Object
java.lang.Record
com.quantfinlib.volatility.VolatilityDecomposition.Decomposition
Record Components:
beta - Cov(a,m)/Var(m)
totalVariance - per-period Var(asset)
systematicVariance - β²·Var(market)
idiosyncraticVariance - the residual: total − systematic (≥ 0)
rSquared - systematic share of total, in [0, 1]
Enclosing class:
VolatilityDecomposition

public static record VolatilityDecomposition.Decomposition(double beta, double totalVariance, double systematicVariance, double idiosyncraticVariance, double rSquared) extends Record
  • Constructor Details

    • Decomposition

      public Decomposition(double beta, double totalVariance, double systematicVariance, double idiosyncraticVariance, double rSquared)
      Creates an instance of a Decomposition record class.
      Parameters:
      beta - the value for the beta record component
      totalVariance - the value for the totalVariance record component
      systematicVariance - the value for the systematicVariance record component
      idiosyncraticVariance - the value for the idiosyncraticVariance record component
      rSquared - the value for the rSquared record component
  • Method Details

    • systematicVol

      public double systematicVol(int periodsPerYear)
      Annualized systematic volatility.
    • idiosyncraticVol

      public double idiosyncraticVol(int periodsPerYear)
      Annualized idiosyncratic volatility.
    • totalVol

      public double totalVol(int periodsPerYear)
      Annualized total volatility.
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • beta

      public double beta()
      Returns the value of the beta record component.
      Returns:
      the value of the beta record component
    • totalVariance

      public double totalVariance()
      Returns the value of the totalVariance record component.
      Returns:
      the value of the totalVariance record component
    • systematicVariance

      public double systematicVariance()
      Returns the value of the systematicVariance record component.
      Returns:
      the value of the systematicVariance record component
    • idiosyncraticVariance

      public double idiosyncraticVariance()
      Returns the value of the idiosyncraticVariance record component.
      Returns:
      the value of the idiosyncraticVariance record component
    • rSquared

      public double rSquared()
      Returns the value of the rSquared record component.
      Returns:
      the value of the rSquared record component