Class NonstandardSwaption
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
An option to enter a nonstandard swap.
public sealed class NonstandardSwaption : Option
- Inheritance
-
NonstandardSwaption
- Inherited Members
Remarks
A swaption has no payoff, and its results are an engine's InstrumentResults. The settlement type and method are checked against each other when the swaption is priced, as QuantLib's arguments check them. CalibrationBasket(BasketGeneratingEngine, SwapIndex, SwaptionVolatilityStructure, EvaluationContext, BasketGeneratingEngineCalibrationBasketType) takes the basket-generating engine, which QuantLib's instrument holds and nanoql's doesn't.
Constructors
NonstandardSwaption(NonstandardSwap, Exercise, SettlementType, SettlementMethod)
Initializes a new instance of the NonstandardSwaption class.
public NonstandardSwaption(NonstandardSwap swap, Exercise exercise, SettlementType delivery = SettlementType.Physical, SettlementMethod settlementMethod = SettlementMethod.PhysicalOTC)
Parameters
swapNonstandardSwapThe underlying swap.
exerciseExerciseThe exercise.
deliverySettlementTypeThe settlement type.
settlementMethodSettlementMethodThe settlement method.
Exceptions
- ArgumentNullException
swaporexerciseis null.- ArgumentOutOfRangeException
deliveryorsettlementMethodisn't a member of its type.
NonstandardSwaption(Swaption, EvaluationContext)
Initializes a new instance of the NonstandardSwaption class from a swaption: its underlying converted, its exercise and settlement.
public NonstandardSwaption(Swaption fromSwaption, EvaluationContext context)
Parameters
fromSwaptionSwaptionThe swaption.
contextEvaluationContextThe evaluation context, whose at-par switch the converted swap's Ibor leg reads.
Exceptions
- ArgumentNullException
An argument is null.
- NanoQLException
The underlying's nominal isn't constant.
Properties
SettlementMethod
Gets the settlement method.
public SettlementMethod SettlementMethod { get; }
Property Value
SettlementType
Gets the settlement type.
public SettlementType SettlementType { get; }
Property Value
Type
Gets the underlying swap's type.
public SwapType Type { get; }
Property Value
Underlying
Gets the underlying swap: QuantLib's underlyingSwap().
public NonstandardSwap Underlying { get; }
Property Value
Methods
CalibrationBasket(BasketGeneratingEngine, SwapIndex, SwaptionVolatilityStructure, EvaluationContext, BasketGeneratingEngineCalibrationBasketType)
The calibration basket of the swaption's live exercise dates: per date, a standard swaption matching the underlying's value, delta and gamma in the model's state, or the at-the-money coterminal one.
public ImmutableArray<SwaptionHelper> CalibrationBasket(BasketGeneratingEngine engine, SwapIndex standardSwapBase, SwaptionVolatilityStructure swaptionVolatility, EvaluationContext context, BasketGeneratingEngineCalibrationBasketType basketType = BasketGeneratingEngineCalibrationBasketType.MaturityStrikeByDeltaGamma)
Parameters
engineBasketGeneratingEngineThe basket-generating engine: a Gaussian1dNonstandardSwaptionEngine.
standardSwapBaseSwapIndexThe standard swaps' index, with its forwarding and, if exogenous, discounting curves.
swaptionVolatilitySwaptionVolatilityStructureThe standard swaptions' volatilities.
contextEvaluationContextThe evaluation context: the exercise dates after its evaluation date are live.
basketTypeBasketGeneratingEngineCalibrationBasketTypeThe basket's type.
Returns
- ImmutableArray<SwaptionHelper>
The helpers, without pricing engines.
Exceptions
- ArgumentNullException
An argument is null.
- NanoQLException
The engine prices another instrument, the swaption's settlement is inconsistent, a curve is missing, or a match fails.
IsExpired(EvaluationContext)
Whether the instrument might still have a value greater than zero.
public override bool IsExpired(EvaluationContext context)
Parameters
contextEvaluationContextThe evaluation context.
Returns
Validate()
Checks the option's terms before an engine prices it: QuantLib's Option::arguments::validate.
public override void Validate()
Exceptions
- NanoQLException
The option has no payoff.