Class FloatingStrikeSwingOption
- All Implemented Interfaces:
FiniteDifferenceEquityProduct, FiniteDifferenceProduct<FiniteDifferenceEquityModel>, Product
This product combines the volume-control features of a swing option with a floating strike determined by a weighted fixing average of the underlying. Let t_0, \ldots, t_{n-1} denote the decision dates and u_0, \ldots, u_{m-1} the fixing dates with associated non-negative weights w_0, \ldots, w_{m-1}. At each decision date the holder chooses an exercised quantity q_i subject to local bounds
q_i \in [q_i^{min}, q_i^{max}],
and global cumulative bounds
Q^{min} \le \sum_{i=0}^{n-1} q_i \le Q^{max}.
The strike is built from an accumulator process
A_{new} = A_{old} + w S,
updated on fixing dates, and the effective strike used at a decision date is
K(A) = strikeShift + strikeScale \cdot A / W,
where W is the cumulative fixing weight available at that decision date. The immediate exercise payoff at a decision time is therefore
q \max(\omega (S - K(A)), 0),
where \omega = 1 for a call and \omega = -1 for a put.
The valuation is carried out by dynamic programming on two additional discrete contract states: cumulative consumed quantity and strike accumulator. Between event dates, continuation values are propagated backward with the existing one- or two-dimensional finite- difference solver of the supplied model. On fixing dates, the accumulator state is shifted according to the fixing rule. On decision dates, the Bellman optimization is applied over the admissible exercised quantities.
If a fixing date and a decision date coincide, the convention
SwingStrikeFixingConvention.FIX_THEN_EXERCISE is applied, that is,
the strike is first
updated using the fixing at that date and only then used in the exercise
payoff.
As in the fixed-strike swing implementation, a full state-independent surface
getValues(FiniteDifferenceEquityModel) is not well defined because
the contract value
depends on the additional cumulative-quantity and accumulator states. Hence
this implementation
exposes getValue(double, FiniteDifferenceEquityModel) at evaluation
time 0 only.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionFloatingStrikeSwingOption(double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double[] localMinQuantity, double[] localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with anonymous underlying.FloatingStrikeSwingOption(double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double localMinQuantity, double localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with anonymous underlying and time-homogeneous local quantity bounds.FloatingStrikeSwingOption(String underlyingName, double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double[] localMinQuantity, double[] localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option.FloatingStrikeSwingOption(String underlyingName, double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double localMinQuantity, double localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with time-homogeneous local quantity bounds. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the accumulator grid.Returns the call/put flag.double[]Returns the decision times.Returns the strike-fixing convention.double[]Returns the fixing times.double[]Returns the fixing weights.doubleReturns the global maximum total quantity.doubleReturns the global minimum total quantity.double[]Returns the local maximum quantities.double[]Returns the local minimum quantities.doubleReturns the maturity.doubleReturns the quantity grid step.Returns the quantity control mode.doubleReturns the multiplicative strike scale.doubleReturns the additive strike shift.Returns the underlying name.double[]getValue(double evaluationTime, FiniteDifferenceEquityModel model) Returns the value at the given evaluation time.double[][]Returns the full value surface.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FiniteDifferenceEquityProduct
getModelClassMethods inherited from interface FiniteDifferenceProduct
getValue
-
Constructor Details
-
FloatingStrikeSwingOption
public FloatingStrikeSwingOption(String underlyingName, double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double[] localMinQuantity, double[] localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option.- Parameters:
underlyingName- Name of the underlying. May benull.decisionTimes- Exercise decision times.fixingTimes- Strike-fixing times.fixingWeights- Strike-fixing weights.strikeShift- Additive strike shift.strikeScale- Multiplicative strike scale.accumulatorGrid- Grid for the strike accumulator state.localMinQuantity- Local minimum quantities.localMaxQuantity- Local maximum quantities.globalMinQuantity- Global minimum total quantity.globalMaxQuantity- Global maximum total quantity.callOrPut- Call/put flag.quantityMode- Quantity control mode.quantityGridStep- Quantity discretization step forSwingQuantityMode.DISCRETE_QUANTITY_GRID.fixingConvention- Strike-fixing convention.
-
FloatingStrikeSwingOption
public FloatingStrikeSwingOption(double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double[] localMinQuantity, double[] localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with anonymous underlying.- Parameters:
decisionTimes- Exercise decision times.fixingTimes- Strike-fixing times.fixingWeights- Strike-fixing weights.strikeShift- Additive strike shift.strikeScale- Multiplicative strike scale.accumulatorGrid- Grid for the strike accumulator state.localMinQuantity- Local minimum quantities.localMaxQuantity- Local maximum quantities.globalMinQuantity- Global minimum total quantity.globalMaxQuantity- Global maximum total quantity.callOrPut- Call/put flag.quantityMode- Quantity control mode.quantityGridStep- Quantity discretization step forSwingQuantityMode.DISCRETE_QUANTITY_GRID.fixingConvention- Strike-fixing convention.
-
FloatingStrikeSwingOption
public FloatingStrikeSwingOption(String underlyingName, double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double localMinQuantity, double localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with time-homogeneous local quantity bounds.- Parameters:
underlyingName- Name of the underlying. May benull.decisionTimes- Exercise decision times.fixingTimes- Strike-fixing times.fixingWeights- Strike-fixing weights.strikeShift- Additive strike shift.strikeScale- Multiplicative strike scale.accumulatorGrid- Grid for the strike accumulator state.localMinQuantity- Constant local minimum quantity.localMaxQuantity- Constant local maximum quantity.globalMinQuantity- Global minimum total quantity.globalMaxQuantity- Global maximum total quantity.callOrPut- Call/put flag.quantityMode- Quantity control mode.quantityGridStep- Quantity discretization step forSwingQuantityMode.DISCRETE_QUANTITY_GRID.fixingConvention- Strike-fixing convention.
-
FloatingStrikeSwingOption
public FloatingStrikeSwingOption(double[] decisionTimes, double[] fixingTimes, double[] fixingWeights, double strikeShift, double strikeScale, double[] accumulatorGrid, double localMinQuantity, double localMaxQuantity, double globalMinQuantity, double globalMaxQuantity, CallOrPut callOrPut, SwingQuantityMode quantityMode, double quantityGridStep, SwingStrikeFixingConvention fixingConvention) Creates a floating-strike swing option with anonymous underlying and time-homogeneous local quantity bounds.- Parameters:
decisionTimes- Exercise decision times.fixingTimes- Strike-fixing times.fixingWeights- Strike-fixing weights.strikeShift- Additive strike shift.strikeScale- Multiplicative strike scale.accumulatorGrid- Grid for the strike accumulator state.localMinQuantity- Constant local minimum quantity.localMaxQuantity- Constant local maximum quantity.globalMinQuantity- Global minimum total quantity.globalMaxQuantity- Global maximum total quantity.callOrPut- Call/put flag.quantityMode- Quantity control mode.quantityGridStep- Quantity discretization step forSwingQuantityMode.DISCRETE_QUANTITY_GRID.fixingConvention- Strike-fixing convention.
-
-
Method Details
-
getValue
Returns the value at the given evaluation time.In this implementation only evaluation time 0 is supported, since the additional contract states must otherwise be supplied explicitly.
- Specified by:
getValuein interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
evaluationTime- Evaluation time.model- The finite-difference model.- Returns:
- The value on the model space grid.
-
getValues
Returns the full value surface.This operation is intentionally unsupported, since the contract value depends on additional discrete states.
- Specified by:
getValuesin interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
model- The finite-difference model.- Returns:
- Never returns normally.
-
getUnderlyingName
Returns the underlying name.- Returns:
- The underlying name, possibly
null.
-
getDecisionTimes
public double[] getDecisionTimes()Returns the decision times.- Returns:
- A defensive copy of the decision times.
-
getFixingTimes
public double[] getFixingTimes()Returns the fixing times.- Returns:
- A defensive copy of the fixing times.
-
getFixingWeights
public double[] getFixingWeights()Returns the fixing weights.- Returns:
- A defensive copy of the fixing weights.
-
getMaturity
public double getMaturity()Returns the maturity.- Returns:
- The maturity.
-
getStrikeShift
public double getStrikeShift()Returns the additive strike shift.- Returns:
- The additive strike shift.
-
getStrikeScale
public double getStrikeScale()Returns the multiplicative strike scale.- Returns:
- The multiplicative strike scale.
-
getAccumulatorGrid
public double[] getAccumulatorGrid()Returns the accumulator grid.- Returns:
- A defensive copy of the accumulator grid.
-
getLocalMinQuantity
public double[] getLocalMinQuantity()Returns the local minimum quantities.- Returns:
- A defensive copy of the local minimum quantities.
-
getLocalMaxQuantity
public double[] getLocalMaxQuantity()Returns the local maximum quantities.- Returns:
- A defensive copy of the local maximum quantities.
-
getGlobalMinQuantity
public double getGlobalMinQuantity()Returns the global minimum total quantity.- Returns:
- The global minimum total quantity.
-
getGlobalMaxQuantity
public double getGlobalMaxQuantity()Returns the global maximum total quantity.- Returns:
- The global maximum total quantity.
-
getCallOrPut
-
getQuantityMode
Returns the quantity control mode.- Returns:
- The quantity control mode.
-
getQuantityGridStep
public double getQuantityGridStep()Returns the quantity grid step.- Returns:
- The quantity grid step.
-
getFixingConvention
Returns the strike-fixing convention.- Returns:
- The strike-fixing convention.
-