Record Class PortfolioRiskAnalyzer.RiskReport
java.lang.Object
java.lang.Record
com.quantfinlib.risk.PortfolioRiskAnalyzer.RiskReport
- Enclosing class:
PortfolioRiskAnalyzer
public static record PortfolioRiskAnalyzer.RiskReport(double annualizedVolatility, double valueAtRisk, double conditionalValueAtRisk, double parametricVaR, double sharpeRatio, Map<String,Double> exposures, Map<String,Double> assetVolatilities, Map<String,Double> assetVaR, Map<String,Double> riskContributions, double[][] correlationMatrix)
extends Record
Full risk report. Volatilities are annualized; VaR/CVaR are per-period
positive loss fractions; risk contributions sum to 1.
-
Constructor Summary
ConstructorsConstructorDescriptionRiskReport(double annualizedVolatility, double valueAtRisk, double conditionalValueAtRisk, double parametricVaR, double sharpeRatio, Map<String, Double> exposures, Map<String, Double> assetVolatilities, Map<String, Double> assetVaR, Map<String, Double> riskContributions, double[][] correlationMatrix) Creates an instance of aRiskReportrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theannualizedVolatilityrecord component.assetVaR()Returns the value of theassetVaRrecord component.Returns the value of theassetVolatilitiesrecord component.doubleReturns the value of theconditionalValueAtRiskrecord component.double[][]Returns the value of thecorrelationMatrixrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexposuresrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theparametricVaRrecord component.Returns the value of theriskContributionsrecord component.doubleReturns the value of thesharpeRatiorecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thevalueAtRiskrecord component.
-
Constructor Details
-
RiskReport
public RiskReport(double annualizedVolatility, double valueAtRisk, double conditionalValueAtRisk, double parametricVaR, double sharpeRatio, Map<String, Double> exposures, Map<String, Double> assetVolatilities, Map<String, Double> assetVaR, Map<String, Double> riskContributions, double[][] correlationMatrix) Creates an instance of aRiskReportrecord class.- Parameters:
annualizedVolatility- the value for theannualizedVolatilityrecord componentvalueAtRisk- the value for thevalueAtRiskrecord componentconditionalValueAtRisk- the value for theconditionalValueAtRiskrecord componentparametricVaR- the value for theparametricVaRrecord componentsharpeRatio- the value for thesharpeRatiorecord componentexposures- the value for theexposuresrecord componentassetVolatilities- the value for theassetVolatilitiesrecord componentassetVaR- the value for theassetVaRrecord componentriskContributions- the value for theriskContributionsrecord componentcorrelationMatrix- the value for thecorrelationMatrixrecord 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. -
annualizedVolatility
public double annualizedVolatility()Returns the value of theannualizedVolatilityrecord component.- Returns:
- the value of the
annualizedVolatilityrecord component
-
valueAtRisk
public double valueAtRisk()Returns the value of thevalueAtRiskrecord component.- Returns:
- the value of the
valueAtRiskrecord component
-
conditionalValueAtRisk
public double conditionalValueAtRisk()Returns the value of theconditionalValueAtRiskrecord component.- Returns:
- the value of the
conditionalValueAtRiskrecord component
-
parametricVaR
public double parametricVaR()Returns the value of theparametricVaRrecord component.- Returns:
- the value of the
parametricVaRrecord component
-
sharpeRatio
public double sharpeRatio()Returns the value of thesharpeRatiorecord component.- Returns:
- the value of the
sharpeRatiorecord component
-
exposures
-
assetVolatilities
-
assetVaR
-
riskContributions
-
correlationMatrix
public double[][] correlationMatrix()Returns the value of thecorrelationMatrixrecord component.- Returns:
- the value of the
correlationMatrixrecord component
-