QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Payoff Class Referenceabstract

Abstract base class for option payoffs. More...

#include <ql/payoff.hpp>

+ Inheritance diagram for Payoff:
+ Collaboration diagram for Payoff:

Public Member Functions

virtual ~Payoff ()=default
 
Payoff interface
virtual std::string name () const =0
 
virtual std::string description () const =0
 
virtual Real operator() (Real price) const =0
 
Visitability
virtual void accept (AcyclicVisitor &)
 

Public Attributes

QL_DEPRECATED typedef Real argument_type
 
QL_DEPRECATED typedef Real result_type
 

Detailed Description

Abstract base class for option payoffs.

Definition at line 36 of file payoff.hpp.

Constructor & Destructor Documentation

◆ ~Payoff()

virtual ~Payoff ( )
virtualdefault

Member Function Documentation

◆ name()

virtual std::string name ( ) const
pure virtual
Warning:
This method is used for output and comparison between payoffs. It is not meant to be used for writing switch-on-type code.

Implemented in BasketPayoff, ForwardTypePayoff, NullPayoff, FloatingTypePayoff, PlainVanillaPayoff, PercentageStrikePayoff, AssetOrNothingPayoff, CashOrNothingPayoff, GapPayoff, SuperFundPayoff, SuperSharePayoff, DoubleStickyRatchetPayoff, RatchetPayoff, StickyPayoff, RatchetMaxPayoff, RatchetMinPayoff, StickyMaxPayoff, StickyMinPayoff, and VanillaForwardPayoff.

+ Here is the caller graph for this function:

◆ description()

virtual std::string description ( ) const
pure virtual

◆ operator()()

virtual Real operator() ( Real  price) const
pure virtual

◆ accept()

void accept ( AcyclicVisitor v)
virtual

Reimplemented in NullPayoff, FloatingTypePayoff, PlainVanillaPayoff, PercentageStrikePayoff, AssetOrNothingPayoff, CashOrNothingPayoff, GapPayoff, SuperFundPayoff, SuperSharePayoff, DoubleStickyRatchetPayoff, and VanillaForwardPayoff.

Definition at line 70 of file payoff.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ argument_type

QL_DEPRECATED typedef Real argument_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 42 of file payoff.hpp.

◆ result_type

QL_DEPRECATED typedef Real result_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 48 of file payoff.hpp.