Record Class FactorRiskModel.Settings

java.lang.Object
java.lang.Record
com.quantfinlib.risk.FactorRiskModel.Settings
Record Components:
factorHalfLife - EWMA half-life of the factor covariance (> 0)
neweyWestLags - Newey-West lags L (≥ 0)
volatilityRegimeHalfLife - half-life of the bias statistic average (0 = no adjustment)
specificHalfLife - EWMA half-life of specific variance (> 0)
shrinkage - Bayesian shrinkage intensity q (≥ 0, 0 = none)
sizeBuckets - number of capitalisation buckets for shrinkage (≥ 1)
winsorLimit - clip of standardised styles, in standard deviations (> 0)
Enclosing class:
FactorRiskModel

public static record FactorRiskModel.Settings(int factorHalfLife, int neweyWestLags, int volatilityRegimeHalfLife, int specificHalfLife, double shrinkage, int sizeBuckets, double winsorLimit) extends Record
Estimation settings. Half-lives are in periods.
  • Constructor Details

    • Settings

      public Settings(int factorHalfLife, int neweyWestLags, int volatilityRegimeHalfLife, int specificHalfLife, double shrinkage, int sizeBuckets, double winsorLimit)
      Creates an instance of a Settings record class.
      Parameters:
      factorHalfLife - the value for the factorHalfLife record component
      neweyWestLags - the value for the neweyWestLags record component
      volatilityRegimeHalfLife - the value for the volatilityRegimeHalfLife record component
      specificHalfLife - the value for the specificHalfLife record component
      shrinkage - the value for the shrinkage record component
      sizeBuckets - the value for the sizeBuckets record component
      winsorLimit - the value for the winsorLimit record component
  • Method Details

    • defaults

      public static FactorRiskModel.Settings defaults()
      Daily defaults close to the USE4 short-horizon choices: factor half-life 90, two Newey-West lags, regime half-life 42, specific half-life 90, q = 0.1, ten size buckets, clip at 3.
    • plain

      public FactorRiskModel.Settings plain()
      The same settings without Newey-West, regime adjustment or shrinkage.
    • 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.
    • factorHalfLife

      public int factorHalfLife()
      Returns the value of the factorHalfLife record component.
      Returns:
      the value of the factorHalfLife record component
    • neweyWestLags

      public int neweyWestLags()
      Returns the value of the neweyWestLags record component.
      Returns:
      the value of the neweyWestLags record component
    • volatilityRegimeHalfLife

      public int volatilityRegimeHalfLife()
      Returns the value of the volatilityRegimeHalfLife record component.
      Returns:
      the value of the volatilityRegimeHalfLife record component
    • specificHalfLife

      public int specificHalfLife()
      Returns the value of the specificHalfLife record component.
      Returns:
      the value of the specificHalfLife record component
    • shrinkage

      public double shrinkage()
      Returns the value of the shrinkage record component.
      Returns:
      the value of the shrinkage record component
    • sizeBuckets

      public int sizeBuckets()
      Returns the value of the sizeBuckets record component.
      Returns:
      the value of the sizeBuckets record component
    • winsorLimit

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