Class GapPayoff
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
The binary gap payoff.
public sealed class GapPayoff : StrikedTypePayoff
- Inheritance
-
GapPayoff
- Inherited Members
Remarks
It is equivalent to being long a PlainVanillaPayoff at the first strike (of the same type) and short a CashOrNothingPayoff at the first strike (of the same type) whose cash payoff is the difference between the second and the first strike. It can be negative depending on the strikes.
Constructors
GapPayoff(OptionType, double, double)
Initializes a new instance of the GapPayoff class.
public GapPayoff(OptionType type, double strike, double secondStrike)
Parameters
typeOptionTypeCall or put.
strikedoubleThe strike that decides whether the payoff is paid.
secondStrikedoubleThe strike the payoff is measured from, a.k.a. the payoff strike.
Exceptions
- ArgumentOutOfRangeException
typeisn't a member of its type.
Properties
Description
Gets the payoff's description: the striked payoff's, then the second strike ("…, 90 strike payoff").
public override string Description { get; }
Property Value
Name
Gets the payoff's name.
public override string Name { get; }
Property Value
Remarks
Used for output and comparison between payoffs. It is not meant to be used for writing switch-on-type code.
SecondStrike
Gets the strike the payoff is measured from, a.k.a. the payoff strike.
public double SecondStrike { get; }
Property Value
Methods
Evaluate(double)
The payoff at the given price: where the option is in the money or at the money, the call's price − second strike or the put's second strike − price; otherwise 0.
public override double Evaluate(double price)
Parameters
pricedoubleThe underlying's price.
Returns
- double
The payoff.