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 Summary
ConstructorsConstructorDescriptionDecomposition(double beta, double totalVariance, double systematicVariance, double idiosyncraticVariance, double rSquared) Creates an instance of aDecompositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebeta()Returns the value of thebetarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theidiosyncraticVariancerecord component.doubleidiosyncraticVol(int periodsPerYear) Annualized idiosyncratic volatility.doublerSquared()Returns the value of therSquaredrecord component.doubleReturns the value of thesystematicVariancerecord component.doublesystematicVol(int periodsPerYear) Annualized systematic volatility.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalVariancerecord component.doubletotalVol(int periodsPerYear) Annualized total volatility.
-
Constructor Details
-
Decomposition
public Decomposition(double beta, double totalVariance, double systematicVariance, double idiosyncraticVariance, double rSquared) Creates an instance of aDecompositionrecord class.- Parameters:
beta- the value for thebetarecord componenttotalVariance- the value for thetotalVariancerecord componentsystematicVariance- the value for thesystematicVariancerecord componentidiosyncraticVariance- the value for theidiosyncraticVariancerecord componentrSquared- the value for therSquaredrecord 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
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
beta
-
totalVariance
public double totalVariance()Returns the value of thetotalVariancerecord component.- Returns:
- the value of the
totalVariancerecord component
-
systematicVariance
public double systematicVariance()Returns the value of thesystematicVariancerecord component.- Returns:
- the value of the
systematicVariancerecord component
-
idiosyncraticVariance
public double idiosyncraticVariance()Returns the value of theidiosyncraticVariancerecord component.- Returns:
- the value of the
idiosyncraticVariancerecord component
-
rSquared
-