Record Class AlphaCombiner.Settings

java.lang.Object
java.lang.Record
com.quantfinlib.alpha.AlphaCombiner.Settings
Record Components:
horizon - holding horizon H in bars (≥ 1)
icHalfLife - half-life of the date weights, in IC dates (> 0)
shrinkToEqual - δ in [0, 1]
step - bars between IC dates (≥ 1)
orthogonalize - apply per-date Gram-Schmidt
Enclosing class:
AlphaCombiner

public static record AlphaCombiner.Settings(int horizon, double icHalfLife, double shrinkToEqual, int step, boolean orthogonalize) extends Record
Combination settings.
  • Constructor Details

    • Settings

      public Settings(int horizon, double icHalfLife, double shrinkToEqual, int step, boolean orthogonalize)
      Creates an instance of a Settings record class.
      Parameters:
      horizon - the value for the horizon record component
      icHalfLife - the value for the icHalfLife record component
      shrinkToEqual - the value for the shrinkToEqual record component
      step - the value for the step record component
      orthogonalize - the value for the orthogonalize record component
  • Method Details

    • of

      public static AlphaCombiner.Settings of(int horizon)
      Orthogonalised, no shrinkage, flat date weights, one IC date per bar.
    • withShrinkToEqual

      public AlphaCombiner.Settings withShrinkToEqual(double delta)
    • withIcHalfLife

      public AlphaCombiner.Settings withIcHalfLife(double dates)
    • withOrthogonalize

      public AlphaCombiner.Settings withOrthogonalize(boolean on)
    • 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.
    • horizon

      public int horizon()
      Returns the value of the horizon record component.
      Returns:
      the value of the horizon record component
    • icHalfLife

      public double icHalfLife()
      Returns the value of the icHalfLife record component.
      Returns:
      the value of the icHalfLife record component
    • shrinkToEqual

      public double shrinkToEqual()
      Returns the value of the shrinkToEqual record component.
      Returns:
      the value of the shrinkToEqual record component
    • step

      public int step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component
    • orthogonalize

      public boolean orthogonalize()
      Returns the value of the orthogonalize record component.
      Returns:
      the value of the orthogonalize record component