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
AverageBasketPayoff Class Reference

#include <ql/instruments/basketoption.hpp>

+ Inheritance diagram for AverageBasketPayoff:
+ Collaboration diagram for AverageBasketPayoff:

Public Member Functions

 AverageBasketPayoff (const ext::shared_ptr< Payoff > &p, Array a)
 
 AverageBasketPayoff (const ext::shared_ptr< Payoff > &p, Size n)
 
Real accumulate (const Array &a) const override
 
- Public Member Functions inherited from BasketPayoff
 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

Array weights_
 

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 70 of file basketoption.hpp.

Constructor & Destructor Documentation

◆ AverageBasketPayoff() [1/2]

AverageBasketPayoff ( const ext::shared_ptr< Payoff > &  p,
Array  a 
)

Definition at line 72 of file basketoption.hpp.

◆ AverageBasketPayoff() [2/2]

AverageBasketPayoff ( const ext::shared_ptr< Payoff > &  p,
Size  n 
)

Definition at line 74 of file basketoption.hpp.

Member Function Documentation

◆ accumulate()

Real accumulate ( const Array a) const
overridevirtual

Implements BasketPayoff.

Definition at line 77 of file basketoption.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ weights_

Array weights_
private

Definition at line 84 of file basketoption.hpp.