Record Class ComponentVar.Allocation
java.lang.Object
java.lang.Record
com.quantfinlib.risk.ComponentVar.Allocation
- Record Components:
portfolioVar- total delta-normal VaR (positive)components- per-position component VaR; sums exactly toportfolioVar; hedges are negativemarginals- per-position marginal VaR (z · (Σw)_i / σ_p)
- Enclosing class:
ComponentVar
public static record ComponentVar.Allocation(double portfolioVar, double[] components, double[] marginals)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAllocation(double portfolioVar, double[] components, double[] marginals) Creates an instance of aAllocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[]Returns the value of themarginalsrecord component.doubleReturns the value of theportfolioVarrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Allocation
public Allocation(double portfolioVar, double[] components, double[] marginals) Creates an instance of aAllocationrecord class.- Parameters:
portfolioVar- the value for theportfolioVarrecord componentcomponents- the value for thecomponentsrecord componentmarginals- the value for themarginalsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
portfolioVar
public double portfolioVar()Returns the value of theportfolioVarrecord component.- Returns:
- the value of the
portfolioVarrecord component
-
components
public double[] components()Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-
marginals
-