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

#include <triggeredswapexercise.hpp>

+ Inheritance diagram for TriggeredSwapExercise:
+ Collaboration diagram for TriggeredSwapExercise:

Public Member Functions

 TriggeredSwapExercise (const std::vector< Time > &rateTimes, const std::vector< Time > &exerciseTimes, std::vector< Rate > strikes)
 
Size numberOfExercises () const override
 
const EvolutionDescriptionevolution () const override
 
void nextStep (const CurveState &) override
 
void reset () override
 
std::valarray< boolisExerciseTime () const override
 
void values (const CurveState &, std::vector< Real > &results) const override
 
std::vector< SizenumberOfVariables () const override
 
std::vector< SizenumberOfParameters () const override
 
bool exercise (Size exerciseNumber, const std::vector< Real > &parameters, const std::vector< Real > &variables) const override
 
void guess (Size exerciseNumber, std::vector< Real > &parameters) const override
 
std::unique_ptr< MarketModelParametricExerciseclone () const override
 
- Public Member Functions inherited from MarketModelParametricExercise
std::vector< SizenumberOfData () const override
 
virtual std::unique_ptr< MarketModelParametricExerciseclone () const =0
 
- Public Member Functions inherited from MarketModelNodeDataProvider
virtual ~MarketModelNodeDataProvider ()=default
 
virtual Size numberOfExercises () const =0
 
virtual std::vector< SizenumberOfData () const =0
 
virtual const EvolutionDescriptionevolution () const =0
 
virtual void nextStep (const CurveState &)=0
 
virtual void reset ()=0
 
virtual std::valarray< boolisExerciseTime () const =0
 
virtual void values (const CurveState &, std::vector< Real > &results) const =0
 
- Public Member Functions inherited from ParametricExercise
virtual ~ParametricExercise ()=default
 
virtual std::vector< SizenumberOfVariables () const =0
 
virtual std::vector< SizenumberOfParameters () const =0
 
virtual bool exercise (Size exerciseNumber, const std::vector< Real > &parameters, const std::vector< Real > &variables) const =0
 
virtual void guess (Size exerciseNumber, std::vector< Real > &parameters) const =0
 

Private Attributes

std::vector< TimerateTimes_
 
std::vector< TimeexerciseTimes_
 
std::vector< Ratestrikes_
 
Size currentStep_ = 0
 
std::vector< SizerateIndex_
 
EvolutionDescription evolution_
 

Detailed Description

Definition at line 28 of file triggeredswapexercise.hpp.

Constructor & Destructor Documentation

◆ TriggeredSwapExercise()

TriggeredSwapExercise ( const std::vector< Time > &  rateTimes,
const std::vector< Time > &  exerciseTimes,
std::vector< Rate strikes 
)

Definition at line 27 of file triggeredswapexercise.cpp.

Member Function Documentation

◆ numberOfExercises()

Size numberOfExercises ( ) const
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 40 of file triggeredswapexercise.cpp.

+ Here is the caller graph for this function:

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 44 of file triggeredswapexercise.cpp.

◆ nextStep()

void nextStep ( const CurveState )
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 48 of file triggeredswapexercise.cpp.

◆ reset()

void reset ( )
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 52 of file triggeredswapexercise.cpp.

◆ isExerciseTime()

std::valarray< bool > isExerciseTime ( ) const
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 56 of file triggeredswapexercise.cpp.

+ Here is the call graph for this function:

◆ values()

void values ( const CurveState state,
std::vector< Real > &  results 
) const
overridevirtual

Implements MarketModelNodeDataProvider.

Definition at line 60 of file triggeredswapexercise.cpp.

+ Here is the call graph for this function:

◆ numberOfVariables()

std::vector< Size > numberOfVariables ( ) const
overridevirtual

Implements ParametricExercise.

Definition at line 67 of file triggeredswapexercise.cpp.

+ Here is the call graph for this function:

◆ numberOfParameters()

std::vector< Size > numberOfParameters ( ) const
overridevirtual

Implements ParametricExercise.

Definition at line 71 of file triggeredswapexercise.cpp.

+ Here is the call graph for this function:

◆ exercise()

bool exercise ( Size  exerciseNumber,
const std::vector< Real > &  parameters,
const std::vector< Real > &  variables 
) const
overridevirtual

Implements ParametricExercise.

Definition at line 75 of file triggeredswapexercise.cpp.

◆ guess()

void guess ( Size  exerciseNumber,
std::vector< Real > &  parameters 
) const
overridevirtual

Implements ParametricExercise.

Definition at line 82 of file triggeredswapexercise.cpp.

◆ clone()

std::unique_ptr< MarketModelParametricExercise > clone ( ) const
overridevirtual

Implements MarketModelParametricExercise.

Definition at line 89 of file triggeredswapexercise.cpp.

Member Data Documentation

◆ rateTimes_

std::vector<Time> rateTimes_
private

Definition at line 53 of file triggeredswapexercise.hpp.

◆ exerciseTimes_

std::vector<Time> exerciseTimes_
private

Definition at line 53 of file triggeredswapexercise.hpp.

◆ strikes_

std::vector<Rate> strikes_
private

Definition at line 54 of file triggeredswapexercise.hpp.

◆ currentStep_

Size currentStep_ = 0
private

Definition at line 55 of file triggeredswapexercise.hpp.

◆ rateIndex_

std::vector<Size> rateIndex_
private

Definition at line 56 of file triggeredswapexercise.hpp.

◆ evolution_

EvolutionDescription evolution_
private

Definition at line 57 of file triggeredswapexercise.hpp.