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

Engine collecting cash flows along a market-model simulation for doing pathwise computation of Deltas. More...

#include <pathwiseaccountingengine.hpp>

+ Collaboration diagram for PathwiseAccountingEngine:

Public Member Functions

 PathwiseAccountingEngine (ext::shared_ptr< LogNormalFwdRateEuler > evolver, const Clone< MarketModelPathwiseMultiProduct > &product, ext::shared_ptr< MarketModel > pseudoRootStructure, Real initialNumeraireValue)
 
void multiplePathValues (SequenceStatisticsInc &stats, Size numberOfPaths)
 

Private Member Functions

Real singlePathValues (std::vector< Real > &values)
 

Private Attributes

ext::shared_ptr< LogNormalFwdRateEulerevolver_
 
Clone< MarketModelPathwiseMultiProductproduct_
 
ext::shared_ptr< MarketModelpseudoRootStructure_
 
Real initialNumeraireValue_
 
Size numberProducts_
 
Size numberRates_
 
Size numberCashFlowTimes_
 
Size numberSteps_
 
std::vector< RealcurrentForwards_
 
std::vector< ReallastForwards_
 
bool doDeflation_
 
std::vector< RealnumerairesHeld_
 
std::vector< SizenumberCashFlowsThisStep_
 
std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > cashFlowsGenerated_
 
std::vector< MarketModelPathwiseDiscounterdiscounters_
 
std::vector< MatrixV_
 
Matrix LIBORRatios_
 
Matrix Discounts_
 
Matrix StepsDiscountsSquared_
 
Matrix LIBORRates_
 
Matrix partials_
 
std::vector< RealdeflatorAndDerivatives_
 
std::vector< std::vector< Size > > numberCashFlowsThisIndex_
 
std::vector< MatrixtotalCashFlowsThisIndex_
 
std::vector< std::vector< Size > > cashFlowIndicesThisStep_
 

Detailed Description

Engine collecting cash flows along a market-model simulation for doing pathwise computation of Deltas.

Definition at line 44 of file pathwiseaccountingengine.hpp.

Constructor & Destructor Documentation

◆ PathwiseAccountingEngine()

PathwiseAccountingEngine ( ext::shared_ptr< LogNormalFwdRateEuler evolver,
const Clone< MarketModelPathwiseMultiProduct > &  product,
ext::shared_ptr< MarketModel pseudoRootStructure,
Real  initialNumeraireValue 
)

Definition at line 31 of file pathwiseaccountingengine.cpp.

Member Function Documentation

◆ multiplePathValues()

void multiplePathValues ( SequenceStatisticsInc stats,
Size  numberOfPaths 
)

Definition at line 312 of file pathwiseaccountingengine.cpp.

+ Here is the call graph for this function:

◆ singlePathValues()

Real singlePathValues ( std::vector< Real > &  values)
private

Definition at line 120 of file pathwiseaccountingengine.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ evolver_

ext::shared_ptr<LogNormalFwdRateEuler> evolver_
private

Definition at line 59 of file pathwiseaccountingengine.hpp.

◆ product_

Definition at line 60 of file pathwiseaccountingengine.hpp.

◆ pseudoRootStructure_

ext::shared_ptr<MarketModel> pseudoRootStructure_
private

Definition at line 61 of file pathwiseaccountingengine.hpp.

◆ initialNumeraireValue_

Real initialNumeraireValue_
private

Definition at line 63 of file pathwiseaccountingengine.hpp.

◆ numberProducts_

Size numberProducts_
private

Definition at line 64 of file pathwiseaccountingengine.hpp.

◆ numberRates_

Size numberRates_
private

Definition at line 65 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowTimes_

Size numberCashFlowTimes_
private

Definition at line 66 of file pathwiseaccountingengine.hpp.

◆ numberSteps_

Size numberSteps_
private

Definition at line 67 of file pathwiseaccountingengine.hpp.

◆ currentForwards_

std::vector<Real> currentForwards_
private

Definition at line 69 of file pathwiseaccountingengine.hpp.

◆ lastForwards_

std::vector<Real> lastForwards_
private

Definition at line 69 of file pathwiseaccountingengine.hpp.

◆ doDeflation_

bool doDeflation_
private

Definition at line 71 of file pathwiseaccountingengine.hpp.

◆ numerairesHeld_

std::vector<Real> numerairesHeld_
private

Definition at line 75 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowsThisStep_

std::vector<Size> numberCashFlowsThisStep_
private

Definition at line 76 of file pathwiseaccountingengine.hpp.

◆ cashFlowsGenerated_

std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> > cashFlowsGenerated_
private

Definition at line 78 of file pathwiseaccountingengine.hpp.

◆ discounters_

std::vector<MarketModelPathwiseDiscounter> discounters_
private

Definition at line 79 of file pathwiseaccountingengine.hpp.

◆ V_

std::vector<Matrix> V_
private

Definition at line 81 of file pathwiseaccountingengine.hpp.

◆ LIBORRatios_

Matrix LIBORRatios_
private

Definition at line 85 of file pathwiseaccountingengine.hpp.

◆ Discounts_

Matrix Discounts_
private

Definition at line 86 of file pathwiseaccountingengine.hpp.

◆ StepsDiscountsSquared_

Matrix StepsDiscountsSquared_
private

Definition at line 88 of file pathwiseaccountingengine.hpp.

◆ LIBORRates_

Matrix LIBORRates_
private

Definition at line 90 of file pathwiseaccountingengine.hpp.

◆ partials_

Matrix partials_
private

Definition at line 91 of file pathwiseaccountingengine.hpp.

◆ deflatorAndDerivatives_

std::vector<Real> deflatorAndDerivatives_
private

Definition at line 93 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowsThisIndex_

std::vector<std::vector<Size> > numberCashFlowsThisIndex_
private

Definition at line 95 of file pathwiseaccountingengine.hpp.

◆ totalCashFlowsThisIndex_

std::vector<Matrix> totalCashFlowsThisIndex_
private

Definition at line 96 of file pathwiseaccountingengine.hpp.

◆ cashFlowIndicesThisStep_

std::vector<std::vector<Size> > cashFlowIndicesThisStep_
private

Definition at line 98 of file pathwiseaccountingengine.hpp.