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

#include <ql/instruments/basketoption.hpp>

+ Inheritance diagram for BasketPayoff:
+ Collaboration diagram for BasketPayoff:

Public Member Functions

 BasketPayoff (ext::shared_ptr< Payoff > p)
 
 ~BasketPayoff () override=default
 
std::string name () const override
 
std::string description () const override
 
Real operator() (Real price) const override
 
virtual Real operator() (const Array &a) const
 
virtual Real accumulate (const Array &a) const =0
 
ext::shared_ptr< PayoffbasePayoff ()
 
- Public Member Functions inherited from Payoff
virtual ~Payoff ()=default
 
virtual void accept (AcyclicVisitor &)
 

Private Attributes

ext::shared_ptr< PayoffbasePayoff_
 

Additional Inherited Members

- Public Attributes inherited from Payoff
QL_DEPRECATED typedef Real argument_type
 
QL_DEPRECATED typedef Real result_type
 

Detailed Description

Definition at line 36 of file basketoption.hpp.

Constructor & Destructor Documentation

◆ BasketPayoff()

BasketPayoff ( ext::shared_ptr< Payoff p)
explicit

Definition at line 40 of file basketoption.hpp.

◆ ~BasketPayoff()

~BasketPayoff ( )
overridedefault

Member Function Documentation

◆ name()

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

Implements Payoff.

Definition at line 42 of file basketoption.hpp.

◆ description()

std::string description ( ) const
overridevirtual

Implements Payoff.

Definition at line 43 of file basketoption.hpp.

◆ operator()() [1/2]

Real operator() ( Real  price) const
overridevirtual

Implements Payoff.

Definition at line 44 of file basketoption.hpp.

◆ operator()() [2/2]

virtual Real operator() ( const Array a) const
virtual

Definition at line 45 of file basketoption.hpp.

+ Here is the call graph for this function:

◆ accumulate()

virtual Real accumulate ( const Array a) const
pure virtual

Implemented in MinBasketPayoff, MaxBasketPayoff, AverageBasketPayoff, and SpreadBasketPayoff.

+ Here is the caller graph for this function:

◆ basePayoff()

ext::shared_ptr< Payoff > basePayoff ( )

Definition at line 49 of file basketoption.hpp.

Member Data Documentation

◆ basePayoff_

ext::shared_ptr<Payoff> basePayoff_
private

Definition at line 38 of file basketoption.hpp.