Table of Contents

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

swap NonstandardSwap

The underlying swap.

exercise Exercise

The exercise.

delivery SettlementType

The settlement type.

settlementMethod SettlementMethod

The settlement method.

Exceptions

ArgumentNullException

swap or exercise is null.

ArgumentOutOfRangeException

delivery or settlementMethod isn'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

fromSwaption Swaption

The swaption.

context EvaluationContext

The 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

SettlementMethod

SettlementType

Gets the settlement type.

public SettlementType SettlementType { get; }

Property Value

SettlementType

Type

Gets the underlying swap's type.

public SwapType Type { get; }

Property Value

SwapType

Underlying

Gets the underlying swap: QuantLib's underlyingSwap().

public NonstandardSwap Underlying { get; }

Property Value

NonstandardSwap

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

engine BasketGeneratingEngine

The basket-generating engine: a Gaussian1dNonstandardSwaptionEngine.

standardSwapBase SwapIndex

The standard swaps' index, with its forwarding and, if exogenous, discounting curves.

swaptionVolatility SwaptionVolatilityStructure

The standard swaptions' volatilities.

context EvaluationContext

The evaluation context: the exercise dates after its evaluation date are live.

basketType BasketGeneratingEngineCalibrationBasketType

The 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

context EvaluationContext

The evaluation context.

Returns

bool

true when the instrument has expired.

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.