Record Class VolSurface.CalendarViolation
java.lang.Object
java.lang.Record
com.quantfinlib.pricing.VolSurface.CalendarViolation
- Enclosing class:
VolSurface
public static record VolSurface.CalendarViolation(double expiry1, double expiry2, double logMoneyness, double totalVariance1, double totalVariance2)
extends Record
Total variance falls between two expiries at this log-moneyness.
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarViolation(double expiry1, double expiry2, double logMoneyness, double totalVariance1, double totalVariance2) Creates an instance of aCalendarViolationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleexpiry1()Returns the value of theexpiry1record component.doubleexpiry2()Returns the value of theexpiry2record component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelogMoneynessrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalVariance1record component.doubleReturns the value of thetotalVariance2record component.
-
Constructor Details
-
CalendarViolation
public CalendarViolation(double expiry1, double expiry2, double logMoneyness, double totalVariance1, double totalVariance2) Creates an instance of aCalendarViolationrecord class.- Parameters:
expiry1- the value for theexpiry1record componentexpiry2- the value for theexpiry2record componentlogMoneyness- the value for thelogMoneynessrecord componenttotalVariance1- the value for thetotalVariance1record componenttotalVariance2- the value for thetotalVariance2record 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 with thecomparemethod from their corresponding wrapper classes. -
expiry1
public double expiry1()Returns the value of theexpiry1record component.- Returns:
- the value of the
expiry1record component
-
expiry2
public double expiry2()Returns the value of theexpiry2record component.- Returns:
- the value of the
expiry2record component
-
logMoneyness
public double logMoneyness()Returns the value of thelogMoneynessrecord component.- Returns:
- the value of the
logMoneynessrecord component
-
totalVariance1
public double totalVariance1()Returns the value of thetotalVariance1record component.- Returns:
- the value of the
totalVariance1record component
-
totalVariance2
public double totalVariance2()Returns the value of thetotalVariance2record component.- Returns:
- the value of the
totalVariance2record component
-