Record Class AlphaBacktester.Result

java.lang.Object
java.lang.Record
com.quantfinlib.alpha.AlphaBacktester.Result
Enclosing class:
AlphaBacktester

public static record AlphaBacktester.Result(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover) extends Record
Net/gross curves plus the cumulative fraction of equity each cost component consumed — the cost autopsy.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Result(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover)
    Creates an instance of a Result record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the commissionDrag record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double[]
    Returns the value of the grossEquity record component.
    Returns the value of the grossMetrics record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the impactDrag record component.
    double
    Returns the value of the meanTurnover record component.
    double[]
    Returns the value of the netEquity record component.
    Returns the value of the netMetrics record component.
    double
    Returns the value of the slippageDrag record component.
    double
    Returns the value of the spreadDrag record component.
    final String
    Returns a string representation of this record class.
    double
    Total cost drag: gross minus net, decomposed.

    Methods inherited from class java.lang.Object

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

    • Result

      public Result(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover)
      Creates an instance of a Result record class.
      Parameters:
      netEquity - the value for the netEquity record component
      grossEquity - the value for the grossEquity record component
      netMetrics - the value for the netMetrics record component
      grossMetrics - the value for the grossMetrics record component
      commissionDrag - the value for the commissionDrag record component
      spreadDrag - the value for the spreadDrag record component
      slippageDrag - the value for the slippageDrag record component
      impactDrag - the value for the impactDrag record component
      meanTurnover - the value for the meanTurnover record component
  • Method Details

    • totalCostDrag

      public double totalCostDrag()
      Total cost drag: gross minus net, decomposed.
    • 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.
    • netEquity

      public double[] netEquity()
      Returns the value of the netEquity record component.
      Returns:
      the value of the netEquity record component
    • grossEquity

      public double[] grossEquity()
      Returns the value of the grossEquity record component.
      Returns:
      the value of the grossEquity record component
    • netMetrics

      public PerformanceMetrics netMetrics()
      Returns the value of the netMetrics record component.
      Returns:
      the value of the netMetrics record component
    • grossMetrics

      public PerformanceMetrics grossMetrics()
      Returns the value of the grossMetrics record component.
      Returns:
      the value of the grossMetrics record component
    • commissionDrag

      public double commissionDrag()
      Returns the value of the commissionDrag record component.
      Returns:
      the value of the commissionDrag record component
    • spreadDrag

      public double spreadDrag()
      Returns the value of the spreadDrag record component.
      Returns:
      the value of the spreadDrag record component
    • slippageDrag

      public double slippageDrag()
      Returns the value of the slippageDrag record component.
      Returns:
      the value of the slippageDrag record component
    • impactDrag

      public double impactDrag()
      Returns the value of the impactDrag record component.
      Returns:
      the value of the impactDrag record component
    • meanTurnover

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