Table of Contents

Class Payoff

Namespace
NanoQL
Assembly
NanoQL.dll

The abstract base class of option payoffs.

public abstract class Payoff
Inheritance
Payoff
Derived
Inherited Members

Remarks

QuantLib's function-call operator is Evaluate(double). Its accept(AcyclicVisitor&) isn't ported: a caller that needs the payoff's type matches it with a switch.

An extension point, as in QuantLib: every payoff derives from it.

Constructors

Payoff()

Initializes a new instance of the Payoff class.

protected Payoff()

Properties

Description

Gets the payoff's description: its name and terms, its numbers in a C++ stream's default format.

public abstract string Description { get; }

Property Value

string

Name

Gets the payoff's name.

public abstract string Name { get; }

Property Value

string

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 of the underlying.

public abstract double Evaluate(double price)

Parameters

price double

The underlying's price.

Returns

double

The payoff.