Record Class WhalleyWilmott.Action
java.lang.Object
java.lang.Record
com.quantfinlib.hedging.WhalleyWilmott.Action
- Enclosing class:
WhalleyWilmott
The rebalancing decision: trade (to the nearest edge) or hold.
-
Constructor Summary
ConstructorsConstructorDescriptionAction(boolean trade, double targetHedge) Creates an instance of aActionrecord 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.doubleReturns the value of thetargetHedgerecord component.final StringtoString()Returns a string representation of this record class.booleantrade()Returns the value of thetraderecord component.
-
Constructor Details
-
Action
public Action(boolean trade, double targetHedge) Creates an instance of aActionrecord class.- Parameters:
trade- the value for thetraderecord componenttargetHedge- the value for thetargetHedgerecord 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. -
trade
public boolean trade()Returns the value of thetraderecord component.- Returns:
- the value of the
traderecord component
-
targetHedge
public double targetHedge()Returns the value of thetargetHedgerecord component.- Returns:
- the value of the
targetHedgerecord component
-