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

#include <multisteptarn.hpp>

+ Inheritance diagram for MultiStepTarn:
+ Collaboration diagram for MultiStepTarn:

Public Member Functions

 MultiStepTarn (const std::vector< Time > &rateTimes, const std::vector< Real > &accruals, const std::vector< Real > &accrualsFloating, const std::vector< Time > &paymentTimes, const std::vector< Time > &paymentTimesFloating, Real totalCoupon, const std::vector< Real > &strikes, std::vector< Real > multipliers, const std::vector< Real > &floatingSpreads)
 
- Public Member Functions inherited from MultiProductMultiStep
 MultiProductMultiStep (std::vector< Time > rateTimes)
 
std::vector< SizesuggestedNumeraires () const override
 
const EvolutionDescriptionevolution () 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< RealaccrualsFloating_
 
std::vector< TimepaymentTimes_
 
std::vector< TimepaymentTimesFloating_
 
std::vector< TimeallPaymentTimes_
 
Real totalCoupon_
 
std::vector< Realstrikes_
 
std::vector< Realmultipliers_
 
std::vector< RealfloatingSpreads_
 
Size lastIndex_
 
Real couponPaid_
 
Size currentIndex_
 
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 MultiProductMultiStep
std::vector< TimerateTimes_
 
EvolutionDescription evolution_
 

Detailed Description

Definition at line 27 of file multisteptarn.hpp.

Constructor & Destructor Documentation

◆ MultiStepTarn()

MultiStepTarn ( const std::vector< Time > &  rateTimes,
const std::vector< Real > &  accruals,
const std::vector< Real > &  accrualsFloating,
const std::vector< Time > &  paymentTimes,
const std::vector< Time > &  paymentTimesFloating,
Real  totalCoupon,
const std::vector< Real > &  strikes,
std::vector< Real multipliers,
const std::vector< Real > &  floatingSpreads 
)

Definition at line 27 of file multisteptarn.cpp.

Member Function Documentation

◆ possibleCashFlowTimes()

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

Implements MarketModelMultiProduct.

Definition at line 94 of file multisteptarn.cpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 98 of file multisteptarn.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 103 of file multisteptarn.cpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelMultiProduct.

Definition at line 107 of file multisteptarn.cpp.

◆ 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 53 of file multisteptarn.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 87 of file multisteptarn.cpp.

Member Data Documentation

◆ accruals_

std::vector<Real> accruals_
private

Definition at line 50 of file multisteptarn.hpp.

◆ accrualsFloating_

std::vector<Real> accrualsFloating_
private

Definition at line 51 of file multisteptarn.hpp.

◆ paymentTimes_

std::vector<Time> paymentTimes_
private

Definition at line 52 of file multisteptarn.hpp.

◆ paymentTimesFloating_

std::vector<Time> paymentTimesFloating_
private

Definition at line 53 of file multisteptarn.hpp.

◆ allPaymentTimes_

std::vector<Time> allPaymentTimes_
private

Definition at line 54 of file multisteptarn.hpp.

◆ totalCoupon_

Real totalCoupon_
private

Definition at line 55 of file multisteptarn.hpp.

◆ strikes_

std::vector<Real> strikes_
private

Definition at line 56 of file multisteptarn.hpp.

◆ multipliers_

std::vector<Real> multipliers_
private

Definition at line 57 of file multisteptarn.hpp.

◆ floatingSpreads_

std::vector<Real> floatingSpreads_
private

Definition at line 58 of file multisteptarn.hpp.

◆ lastIndex_

Size lastIndex_
private

Definition at line 59 of file multisteptarn.hpp.

◆ couponPaid_

Real couponPaid_
private

Definition at line 62 of file multisteptarn.hpp.

◆ currentIndex_

Size currentIndex_
private

Definition at line 63 of file multisteptarn.hpp.