Record Class BenchmarkComparison.Result

java.lang.Object
java.lang.Record
com.quantfinlib.backtest.BenchmarkComparison.Result
Record Components:
alpha - annualized Jensen alpha (risk-free = 0)
beta - regression beta vs the benchmark
trackingError - annualized stdev of active returns
informationRatio - annualized active return / tracking error; 0 when TE is 0 (identical series)
upCapture - capture ratio over benchmark-up periods (NaN if none)
downCapture - capture ratio over benchmark-down periods (NaN if none)
activeReturn - annualized mean of (strategy − benchmark)
Enclosing class:
BenchmarkComparison

public static record BenchmarkComparison.Result(double alpha, double beta, double trackingError, double informationRatio, double upCapture, double downCapture, double activeReturn) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Result(double alpha, double beta, double trackingError, double informationRatio, double upCapture, double downCapture, double activeReturn)
    Creates an instance of a Result record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the activeReturn record component.
    double
    Returns the value of the alpha record component.
    double
    Returns the value of the beta record component.
    double
    Returns the value of the downCapture record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the informationRatio record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the trackingError record component.
    double
    Returns the value of the upCapture record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Result

      public Result(double alpha, double beta, double trackingError, double informationRatio, double upCapture, double downCapture, double activeReturn)
      Creates an instance of a Result record class.
      Parameters:
      alpha - the value for the alpha record component
      beta - the value for the beta record component
      trackingError - the value for the trackingError record component
      informationRatio - the value for the informationRatio record component
      upCapture - the value for the upCapture record component
      downCapture - the value for the downCapture record component
      activeReturn - the value for the activeReturn 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. All components in this record class 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.
    • alpha

      public double alpha()
      Returns the value of the alpha record component.
      Returns:
      the value of the alpha record component
    • beta

      public double beta()
      Returns the value of the beta record component.
      Returns:
      the value of the beta record component
    • trackingError

      public double trackingError()
      Returns the value of the trackingError record component.
      Returns:
      the value of the trackingError record component
    • informationRatio

      public double informationRatio()
      Returns the value of the informationRatio record component.
      Returns:
      the value of the informationRatio record component
    • upCapture

      public double upCapture()
      Returns the value of the upCapture record component.
      Returns:
      the value of the upCapture record component
    • downCapture

      public double downCapture()
      Returns the value of the downCapture record component.
      Returns:
      the value of the downCapture record component
    • activeReturn

      public double activeReturn()
      Returns the value of the activeReturn record component.
      Returns:
      the value of the activeReturn record component