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 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 a RiskReport record class.
      Parameters:
      annualizedVolatility - the value for the annualizedVolatility record component
      valueAtRisk - the value for the valueAtRisk record component
      conditionalValueAtRisk - the value for the conditionalValueAtRisk record component
      parametricVaR - the value for the parametricVaR record component
      sharpeRatio - the value for the sharpeRatio record component
      exposures - the value for the exposures record component
      assetVolatilities - the value for the assetVolatilities record component
      assetVaR - the value for the assetVaR record component
      riskContributions - the value for the riskContributions record component
      correlationMatrix - the value for the correlationMatrix record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • annualizedVolatility

      public double annualizedVolatility()
      Returns the value of the annualizedVolatility record component.
      Returns:
      the value of the annualizedVolatility record component
    • valueAtRisk

      public double valueAtRisk()
      Returns the value of the valueAtRisk record component.
      Returns:
      the value of the valueAtRisk record component
    • conditionalValueAtRisk

      public double conditionalValueAtRisk()
      Returns the value of the conditionalValueAtRisk record component.
      Returns:
      the value of the conditionalValueAtRisk record component
    • parametricVaR

      public double parametricVaR()
      Returns the value of the parametricVaR record component.
      Returns:
      the value of the parametricVaR record component
    • sharpeRatio

      public double sharpeRatio()
      Returns the value of the sharpeRatio record component.
      Returns:
      the value of the sharpeRatio record component
    • exposures

      public Map<String,Double> exposures()
      Returns the value of the exposures record component.
      Returns:
      the value of the exposures record component
    • assetVolatilities

      public Map<String,Double> assetVolatilities()
      Returns the value of the assetVolatilities record component.
      Returns:
      the value of the assetVolatilities record component
    • assetVaR

      public Map<String,Double> assetVaR()
      Returns the value of the assetVaR record component.
      Returns:
      the value of the assetVaR record component
    • riskContributions

      public Map<String,Double> riskContributions()
      Returns the value of the riskContributions record component.
      Returns:
      the value of the riskContributions record component
    • correlationMatrix

      public double[][] correlationMatrix()
      Returns the value of the correlationMatrix record component.
      Returns:
      the value of the correlationMatrix record component