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

Abstract base class for option payoffs. More...

#include <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 &)
 

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 58 of file payoff.hpp.

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