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

Market-model engine for upper-bound estimation. More...

#include <upperboundengine.hpp>

+ Collaboration diagram for UpperBoundEngine:

Public Member Functions

 UpperBoundEngine (ext::shared_ptr< MarketModelEvolver > evolver, std::vector< ext::shared_ptr< MarketModelEvolver > > innerEvolvers, const MarketModelMultiProduct &underlying, const MarketModelExerciseValue &rebate, const MarketModelMultiProduct &hedge, const MarketModelExerciseValue &hedgeRebate, const ExerciseStrategy< CurveState > &hedgeStrategy, Real initialNumeraireValue)
 
void multiplePathValues (Statistics &stats, Size outerPaths, Size innerPaths)
 
std::pair< Real, RealsinglePathValue (Size innerPaths)
 

Private Member Functions

Real collectCashFlows (Size currentStep, Real principalInNumerairePortfolio, Size beginProduct, Size endProduct) const
 

Private Attributes

ext::shared_ptr< MarketModelEvolverevolver_
 
std::vector< ext::shared_ptr< MarketModelEvolver > > innerEvolvers_
 
MultiProductComposite composite_
 
Real initialNumeraireValue_
 
Size underlyingSize_
 
Size rebateSize_
 
Size hedgeSize_
 
Size hedgeRebateSize_
 
Size underlyingOffset_
 
Size rebateOffset_
 
Size hedgeOffset_
 
Size hedgeRebateOffset_
 
Size numberOfProducts_
 
Size numberOfSteps_
 
std::valarray< boolisExerciseTime_
 
std::vector< SizenumberCashFlowsThisStep_
 
std::vector< std::vector< MarketModelMultiProduct::CashFlow > > cashFlowsGenerated_
 
std::vector< MarketModelDiscounterdiscounters_
 

Detailed Description

Market-model engine for upper-bound estimation.

Precondition
product and hedge must have the same rate times and exercise times
Examples
MarketModels.cpp.

Definition at line 43 of file upperboundengine.hpp.

Constructor & Destructor Documentation

◆ UpperBoundEngine()

UpperBoundEngine ( ext::shared_ptr< MarketModelEvolver evolver,
std::vector< ext::shared_ptr< MarketModelEvolver > >  innerEvolvers,
const MarketModelMultiProduct underlying,
const MarketModelExerciseValue rebate,
const MarketModelMultiProduct hedge,
const MarketModelExerciseValue hedgeRebate,
const ExerciseStrategy< CurveState > &  hedgeStrategy,
Real  initialNumeraireValue 
)

Definition at line 108 of file upperboundengine.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ multiplePathValues()

void multiplePathValues ( Statistics stats,
Size  outerPaths,
Size  innerPaths 
)

Definition at line 165 of file upperboundengine.cpp.

+ Here is the call graph for this function:

◆ singlePathValue()

std::pair< Real, Real > singlePathValue ( Size  innerPaths)

Definition at line 175 of file upperboundengine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collectCashFlows()

Real collectCashFlows ( Size  currentStep,
Real  principalInNumerairePortfolio,
Size  beginProduct,
Size  endProduct 
) const
private

Definition at line 319 of file upperboundengine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ evolver_

ext::shared_ptr<MarketModelEvolver> evolver_
private

Definition at line 63 of file upperboundengine.hpp.

◆ innerEvolvers_

std::vector<ext::shared_ptr<MarketModelEvolver> > innerEvolvers_
private

Definition at line 64 of file upperboundengine.hpp.

◆ composite_

MultiProductComposite composite_
private

Definition at line 65 of file upperboundengine.hpp.

◆ initialNumeraireValue_

Real initialNumeraireValue_
private

Definition at line 67 of file upperboundengine.hpp.

◆ underlyingSize_

Size underlyingSize_
private

Definition at line 68 of file upperboundengine.hpp.

◆ rebateSize_

Size rebateSize_
private

Definition at line 68 of file upperboundengine.hpp.

◆ hedgeSize_

Size hedgeSize_
private

Definition at line 68 of file upperboundengine.hpp.

◆ hedgeRebateSize_

Size hedgeRebateSize_
private

Definition at line 68 of file upperboundengine.hpp.

◆ underlyingOffset_

Size underlyingOffset_
private

Definition at line 69 of file upperboundengine.hpp.

◆ rebateOffset_

Size rebateOffset_
private

Definition at line 69 of file upperboundengine.hpp.

◆ hedgeOffset_

Size hedgeOffset_
private

Definition at line 69 of file upperboundengine.hpp.

◆ hedgeRebateOffset_

Size hedgeRebateOffset_
private

Definition at line 69 of file upperboundengine.hpp.

◆ numberOfProducts_

Size numberOfProducts_
private

Definition at line 70 of file upperboundengine.hpp.

◆ numberOfSteps_

Size numberOfSteps_
private

Definition at line 71 of file upperboundengine.hpp.

◆ isExerciseTime_

std::valarray<bool> isExerciseTime_
private

Definition at line 72 of file upperboundengine.hpp.

◆ numberCashFlowsThisStep_

std::vector<Size> numberCashFlowsThisStep_
private

Definition at line 75 of file upperboundengine.hpp.

◆ cashFlowsGenerated_

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

Definition at line 77 of file upperboundengine.hpp.

◆ discounters_

std::vector<MarketModelDiscounter> discounters_
private

Definition at line 78 of file upperboundengine.hpp.