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

Class for forward type payoffs. More...

#include <ql/instruments/forward.hpp>

+ Inheritance diagram for ForwardTypePayoff:
+ Collaboration diagram for ForwardTypePayoff:

Public Member Functions

 ForwardTypePayoff (Position::Type type, Real strike)
 
Position::Type forwardType () const
 
Real strike () const
 
- Public Member Functions inherited from Payoff
virtual ~Payoff ()=default
 
virtual void accept (AcyclicVisitor &)
 

Payoff interface

Position::Type type_
 
Real strike_
 
std::string name () const override
 
std::string description () const override
 
Real operator() (Real price) const override
 

Additional Inherited Members

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

Detailed Description

Class for forward type payoffs.

Definition at line 145 of file forward.hpp.

Constructor & Destructor Documentation

◆ ForwardTypePayoff()

ForwardTypePayoff ( Position::Type  type,
Real  strike 
)

Definition at line 147 of file forward.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ forwardType()

Position::Type forwardType ( ) const

Definition at line 151 of file forward.hpp.

◆ strike()

Real strike ( ) const

Definition at line 152 of file forward.hpp.

+ Here is the caller graph for this function:

◆ 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 155 of file forward.hpp.

+ Here is the caller graph for this function:

◆ description()

std::string description ( ) const
overridevirtual

Implements Payoff.

Definition at line 189 of file forward.hpp.

+ Here is the call graph for this function:

◆ operator()()

Real operator() ( Real  price) const
overridevirtual

Implements Payoff.

Definition at line 195 of file forward.hpp.

Member Data Documentation

◆ type_

Position::Type type_
protected

Definition at line 160 of file forward.hpp.

◆ strike_

Real strike_
protected

Definition at line 161 of file forward.hpp.