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

#include <onestepforwards.hpp>

+ Inheritance diagram for OneStepForwards:
+ Collaboration diagram for OneStepForwards:

Public Member Functions

 OneStepForwards (const std::vector< Time > &rateTimes, std::vector< Real > accruals, const std::vector< Time > &paymentTimes, std::vector< Rate > strikes)
 
- Public Member Functions inherited from MultiProductOneStep
 MultiProductOneStep (std::vector< Time > rateTimes)
 
const EvolutionDescriptionevolution () const override
 
std::vector< SizesuggestedNumeraires () const override
 
- Public Member Functions inherited from MarketModelMultiProduct
virtual ~MarketModelMultiProduct ()=default
 
virtual std::vector< SizesuggestedNumeraires () const =0
 
virtual const EvolutionDescriptionevolution () const =0
 
virtual std::vector< TimepossibleCashFlowTimes () const =0
 
virtual Size numberOfProducts () const =0
 
virtual Size maxNumberOfCashFlowsPerProductPerStep () const =0
 
virtual void reset ()=0
 during simulation put product at start of path More...
 
virtual bool nextTimeStep (const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated)=0
 return value indicates whether path is finished, TRUE means done More...
 
virtual std::unique_ptr< MarketModelMultiProductclone () const =0
 returns a newly-allocated copy of itself More...
 

MarketModelMultiProduct interface

std::vector< Realaccruals_
 
std::vector< TimepaymentTimes_
 
std::vector< Ratestrikes_
 
std::vector< TimepossibleCashFlowTimes () const override
 
Size numberOfProducts () const override
 
Size maxNumberOfCashFlowsPerProductPerStep () const override
 
void reset () override
 during simulation put product at start of path More...
 
bool nextTimeStep (const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated) override
 return value indicates whether path is finished, TRUE means done More...
 
std::unique_ptr< MarketModelMultiProductclone () const override
 returns a newly-allocated copy of itself More...
 

Additional Inherited Members

- Protected Attributes inherited from MultiProductOneStep
std::vector< TimerateTimes_
 
EvolutionDescription evolution_
 

Detailed Description

Definition at line 28 of file onestepforwards.hpp.

Constructor & Destructor Documentation

◆ OneStepForwards()

OneStepForwards ( const std::vector< Time > &  rateTimes,
std::vector< Real accruals,
const std::vector< Time > &  paymentTimes,
std::vector< Rate strikes 
)

Definition at line 27 of file onestepforwards.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ possibleCashFlowTimes()

std::vector< Time > possibleCashFlowTimes ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 54 of file onestepforwards.hpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 59 of file onestepforwards.hpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 64 of file onestepforwards.hpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelMultiProduct.

Definition at line 69 of file onestepforwards.hpp.

◆ nextTimeStep()

bool nextTimeStep ( const CurveState currentState,
std::vector< Size > &  numberCashFlowsThisStep,
std::vector< std::vector< CashFlow > > &  cashFlowsGenerated 
)
overridevirtual

return value indicates whether path is finished, TRUE means done

Implements MarketModelMultiProduct.

Definition at line 36 of file onestepforwards.cpp.

+ Here is the call graph for this function:

◆ clone()

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

returns a newly-allocated copy of itself

Implements MarketModelMultiProduct.

Definition at line 54 of file onestepforwards.cpp.

Member Data Documentation

◆ accruals_

std::vector<Real> accruals_
private

Definition at line 46 of file onestepforwards.hpp.

◆ paymentTimes_

std::vector<Time> paymentTimes_
private

Definition at line 47 of file onestepforwards.hpp.

◆ strikes_

std::vector<Rate> strikes_
private

Definition at line 48 of file onestepforwards.hpp.