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 Summary
ConstructorsConstructorDescriptionOptionParameters(Real spotPrice, Real strikePrice, Real timeToExpiry, Real riskFreeRate, Real volatility, OptionPricer.OptionType type, OptionPricer.OptionStyle style) Creates an instance of aOptionParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theriskFreeRaterecord component.Returns the value of thespotPricerecord component.Returns the value of thestrikePricerecord component.style()Returns the value of thestylerecord component.Returns the value of thetimeToExpiryrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thevolatilityrecord component.
-
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 aOptionParametersrecord class.- Parameters:
spotPrice- the value for thespotPricerecord componentstrikePrice- the value for thestrikePricerecord componenttimeToExpiry- the value for thetimeToExpiryrecord componentriskFreeRate- the value for theriskFreeRaterecord componentvolatility- the value for thevolatilityrecord componenttype- the value for thetyperecord componentstyle- the value for thestylerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
spotPrice
Returns the value of thespotPricerecord component.- Returns:
- the value of the
spotPricerecord component
-
strikePrice
Returns the value of thestrikePricerecord component.- Returns:
- the value of the
strikePricerecord component
-
timeToExpiry
Returns the value of thetimeToExpiryrecord component.- Returns:
- the value of the
timeToExpiryrecord component
-
riskFreeRate
Returns the value of theriskFreeRaterecord component.- Returns:
- the value of the
riskFreeRaterecord component
-
volatility
Returns the value of thevolatilityrecord component.- Returns:
- the value of the
volatilityrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-