Record Class OptionPricer.OptionParameters

java.lang.Object
java.lang.Record
org.episteme.social.economics.OptionPricer.OptionParameters
Enclosing class:
OptionPricer

public static record OptionPricer.OptionParameters(Real spotPrice, Real strikePrice, Real timeToExpiry, Real riskFreeRate, Real volatility, OptionPricer.OptionType type, OptionPricer.OptionStyle style) extends Record
Since:
1.0
Version:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • OptionParameters

      public OptionParameters(Real spotPrice, Real strikePrice, Real timeToExpiry, Real riskFreeRate, Real volatility, OptionPricer.OptionType type, OptionPricer.OptionStyle style)
      Creates an instance of a OptionParameters record class.
      Parameters:
      spotPrice - the value for the spotPrice record component
      strikePrice - the value for the strikePrice record component
      timeToExpiry - the value for the timeToExpiry record component
      riskFreeRate - the value for the riskFreeRate record component
      volatility - the value for the volatility record component
      type - the value for the type record component
      style - the value for the style 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 Objects::equals(Object,Object).
      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.
    • spotPrice

      public Real spotPrice()
      Returns the value of the spotPrice record component.
      Returns:
      the value of the spotPrice record component
    • strikePrice

      public Real strikePrice()
      Returns the value of the strikePrice record component.
      Returns:
      the value of the strikePrice record component
    • timeToExpiry

      public Real timeToExpiry()
      Returns the value of the timeToExpiry record component.
      Returns:
      the value of the timeToExpiry record component
    • riskFreeRate

      public Real riskFreeRate()
      Returns the value of the riskFreeRate record component.
      Returns:
      the value of the riskFreeRate record component
    • volatility

      public Real volatility()
      Returns the value of the volatility record component.
      Returns:
      the value of the volatility record component
    • type

      public OptionPricer.OptionType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • style

      public OptionPricer.OptionStyle style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component