Class ComponentVar.Allocation
java.lang.Object
com.quantfinlib.risk.ComponentVar.Allocation
- Enclosing class:
ComponentVar
-
Constructor Summary
ConstructorsConstructorDescriptionAllocation(double portfolioVar, double[] components, double[] marginals) Creates the value; array and collection arguments are copied. -
Method Summary
Modifier and TypeMethodDescriptiondoublecomponents(int i) Elementiofcomponents.double[]A fresh copy ofcomponents.intLength ofcomponents.booleaninthashCode()doublemarginals(int i) Elementiofmarginals(per-position marginal VaR (z · (Σw)_i / σ_p)).double[]A fresh copy ofmarginals.intLength ofmarginals.doubleportfolioVar(total delta-normal VaR (positive)).toString()
-
Constructor Details
-
Allocation
public Allocation(double portfolioVar, double[] components, double[] marginals) Creates the value; array and collection arguments are copied.- Parameters:
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)
-
-
Method Details
-
portfolioVar
public double portfolioVar()portfolioVar(total delta-normal VaR (positive)). -
components
public double components(int i) Elementiofcomponents. -
componentsLength
public int componentsLength()Length ofcomponents. -
componentsCopy
public double[] componentsCopy()A fresh copy ofcomponents. -
marginals
public double marginals(int i) Elementiofmarginals(per-position marginal VaR (z · (Σw)_i / σ_p)). -
marginalsLength
public int marginalsLength()Length ofmarginals. -
marginalsCopy
public double[] marginalsCopy()A fresh copy ofmarginals. -
equals
-
hashCode
-
toString
-