Class PlainVanillaPayoff
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
The plain-vanilla payoff.
public sealed class PlainVanillaPayoff : StrikedTypePayoff
- Inheritance
-
PlainVanillaPayoff
- Inherited Members
Constructors
PlainVanillaPayoff(OptionType, double)
Initializes a new instance of the PlainVanillaPayoff class.
public PlainVanillaPayoff(OptionType type, double strike)
Parameters
typeOptionTypeCall or put.
strikedoubleThe strike.
Exceptions
- ArgumentOutOfRangeException
typeisn't a member of its type.
Properties
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.
Methods
Evaluate(double)
The payoff at the given price: the call's max(price − strike, 0) or the put's max(strike − price, 0).
public override double Evaluate(double price)
Parameters
pricedoubleThe underlying's price.
Returns
- double
The payoff.