Class VarianceOption
- Namespace
- NanoQL.Experimental
- Assembly
- NanoQL.dll
An option on realized variance: at maturity it pays the notional times the payoff of the variance realized from the start date.
[Experimental("NQL0001")]
public sealed class VarianceOption : Instrument
- Inheritance
-
VarianceOption
- Inherited Members
Remarks
Immutable. Its engines return an InstrumentResults, QuantLib's results class adding nothing to the instrument's. QuantLib doesn't manage seasoned variance options: an engine refuses a start before the evaluation date.
Constructors
VarianceOption(Payoff, double, Date, Date)
Initializes a new instance of the VarianceOption class.
public VarianceOption(Payoff payoff, double notional, Date startDate, Date maturityDate)
Parameters
payoffPayoffThe payoff on the realized variance.
notionaldoubleThe notional.
startDateDateThe start of the variance's realization.
maturityDateDateThe maturity.
Exceptions
- ArgumentNullException
payoffis null.- ArgumentException
A date is the default date ("null start date given", "null maturity date given", as QuantLib's validation reads them).
Properties
MaturityDate
Gets the maturity.
public Date MaturityDate { get; }
Property Value
Notional
Gets the notional.
public double Notional { get; }
Property Value
Payoff
Gets the payoff on the realized variance.
public Payoff Payoff { get; }
Property Value
StartDate
Gets the start of the variance's realization.
public Date StartDate { get; }
Property Value
Methods
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 instrument's terms before an engine prices it, as QuantLib's arguments do.
public override void Validate()
Remarks
QuantLib's "no strike given", "no notional given" and the null-date checks can't fail here: the constructor holds a payoff, a value and two dates.
Exceptions
- NanoQLException
The notional isn't positive ("negative or null notional given").