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

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

#include <ql/models/marketmodels/pathwiseaccountingengine.hpp>

+ Collaboration diagram for PathwiseVegasAccountingEngine:

Public Member Functions

 PathwiseVegasAccountingEngine (ext::shared_ptr< LogNormalFwdRateEuler > evolver, const Clone< MarketModelPathwiseMultiProduct > &product, ext::shared_ptr< MarketModel > pseudoRootStructure, const std::vector< std::vector< Matrix > > &VegaBumps, Real initialNumeraireValue)
 
void multiplePathValues (std::vector< Real > &means, std::vector< Real > &errors, Size numberOfPaths)
 

Private Member Functions

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

Private Attributes

ext::shared_ptr< LogNormalFwdRateEulerevolver_
 
Clone< MarketModelPathwiseMultiProductproduct_
 
ext::shared_ptr< MarketModelpseudoRootStructure_
 
std::vector< Sizenumeraires_
 
Real initialNumeraireValue_
 
Size numberProducts_
 
Size numberRates_
 
Size numberCashFlowTimes_
 
Size numberSteps_
 
Size numberBumps_
 
std::vector< RatePseudoRootJacobianjacobianComputers_
 
bool doDeflation_
 
std::vector< RealcurrentForwards_
 
std::vector< ReallastForwards_
 
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_
 
std::vector< RealstepsDiscounts_
 
Matrix LIBORRates_
 
Matrix partials_
 
Matrix vegasThisPath_
 
std::vector< MatrixjacobiansThisPaths_
 
std::vector< RealdeflatorAndDerivatives_
 
std::vector< RealfullDerivatives_
 
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 and vegas.

Definition at line 115 of file pathwiseaccountingengine.hpp.

Constructor & Destructor Documentation

◆ PathwiseVegasAccountingEngine()

PathwiseVegasAccountingEngine ( ext::shared_ptr< LogNormalFwdRateEuler evolver,
const Clone< MarketModelPathwiseMultiProduct > &  product,
ext::shared_ptr< MarketModel pseudoRootStructure,
const std::vector< std::vector< Matrix > > &  VegaBumps,
Real  initialNumeraireValue 
)

Definition at line 327 of file pathwiseaccountingengine.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ multiplePathValues()

void multiplePathValues ( std::vector< Real > &  means,
std::vector< Real > &  errors,
Size  numberOfPaths 
)

Definition at line 677 of file pathwiseaccountingengine.cpp.

+ Here is the call graph for this function:

◆ singlePathValues()

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

Definition at line 444 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 132 of file pathwiseaccountingengine.hpp.

◆ product_

Definition at line 133 of file pathwiseaccountingengine.hpp.

◆ pseudoRootStructure_

ext::shared_ptr<MarketModel> pseudoRootStructure_
private

Definition at line 134 of file pathwiseaccountingengine.hpp.

◆ numeraires_

std::vector<Size> numeraires_
private

Definition at line 135 of file pathwiseaccountingengine.hpp.

◆ initialNumeraireValue_

Real initialNumeraireValue_
private

Definition at line 137 of file pathwiseaccountingengine.hpp.

◆ numberProducts_

Size numberProducts_
private

Definition at line 138 of file pathwiseaccountingengine.hpp.

◆ numberRates_

Size numberRates_
private

Definition at line 139 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowTimes_

Size numberCashFlowTimes_
private

Definition at line 140 of file pathwiseaccountingengine.hpp.

◆ numberSteps_

Size numberSteps_
private

Definition at line 141 of file pathwiseaccountingengine.hpp.

◆ numberBumps_

Size numberBumps_
private

Definition at line 142 of file pathwiseaccountingengine.hpp.

◆ jacobianComputers_

std::vector<RatePseudoRootJacobian> jacobianComputers_
private

Definition at line 144 of file pathwiseaccountingengine.hpp.

◆ doDeflation_

bool doDeflation_
private

Definition at line 147 of file pathwiseaccountingengine.hpp.

◆ currentForwards_

std::vector<Real> currentForwards_
private

Definition at line 151 of file pathwiseaccountingengine.hpp.

◆ lastForwards_

std::vector<Real> lastForwards_
private

Definition at line 151 of file pathwiseaccountingengine.hpp.

◆ numerairesHeld_

std::vector<Real> numerairesHeld_
private

Definition at line 152 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowsThisStep_

std::vector<Size> numberCashFlowsThisStep_
private

Definition at line 153 of file pathwiseaccountingengine.hpp.

◆ cashFlowsGenerated_

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

Definition at line 155 of file pathwiseaccountingengine.hpp.

◆ discounters_

std::vector<MarketModelPathwiseDiscounter> discounters_
private

Definition at line 156 of file pathwiseaccountingengine.hpp.

◆ V_

std::vector<Matrix> V_
private

Definition at line 158 of file pathwiseaccountingengine.hpp.

◆ LIBORRatios_

Matrix LIBORRatios_
private

Definition at line 160 of file pathwiseaccountingengine.hpp.

◆ Discounts_

Matrix Discounts_
private

Definition at line 161 of file pathwiseaccountingengine.hpp.

◆ StepsDiscountsSquared_

Matrix StepsDiscountsSquared_
private

Definition at line 163 of file pathwiseaccountingengine.hpp.

◆ stepsDiscounts_

std::vector<Real> stepsDiscounts_
private

Definition at line 164 of file pathwiseaccountingengine.hpp.

◆ LIBORRates_

Matrix LIBORRates_
private

Definition at line 166 of file pathwiseaccountingengine.hpp.

◆ partials_

Matrix partials_
private

Definition at line 167 of file pathwiseaccountingengine.hpp.

◆ vegasThisPath_

Matrix vegasThisPath_
private

Definition at line 169 of file pathwiseaccountingengine.hpp.

◆ jacobiansThisPaths_

std::vector<Matrix> jacobiansThisPaths_
private

Definition at line 170 of file pathwiseaccountingengine.hpp.

◆ deflatorAndDerivatives_

std::vector<Real> deflatorAndDerivatives_
private

Definition at line 172 of file pathwiseaccountingengine.hpp.

◆ fullDerivatives_

std::vector<Real> fullDerivatives_
private

Definition at line 173 of file pathwiseaccountingengine.hpp.

◆ numberCashFlowsThisIndex_

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

Definition at line 175 of file pathwiseaccountingengine.hpp.

◆ totalCashFlowsThisIndex_

std::vector<Matrix> totalCashFlowsThisIndex_
private

Definition at line 176 of file pathwiseaccountingengine.hpp.

◆ cashFlowIndicesThisStep_

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

Definition at line 178 of file pathwiseaccountingengine.hpp.