Valuation Engine. More...
#include <orea/engine/valuationengine.hpp>
Public Member Functions | |
ValuationEngine (const QuantLib::Date &today, const QuantLib::ext::shared_ptr< ore::data::DateGrid > &dg, const QuantLib::ext::shared_ptr< analytics::SimMarket > &simMarket, const set< std::pair< std::string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder >>> &modelBuilders=set< std::pair< std::string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder >>>()) | |
Constructor. More... | |
void | buildCube (const QuantLib::ext::shared_ptr< data::Portfolio > &portfolio, QuantLib::ext::shared_ptr< analytics::NPVCube > outputCube, std::vector< QuantLib::ext::shared_ptr< ValuationCalculator >> calculators, bool mporStickyDate=true, QuantLib::ext::shared_ptr< analytics::NPVCube > outputCubeNettingSet=nullptr, QuantLib::ext::shared_ptr< analytics::NPVCube > outputCptyCube=nullptr, std::vector< QuantLib::ext::shared_ptr< CounterpartyCalculator >> cptyCalculators={}, bool dryRun=false) |
Build NPV cube. More... | |
Public Member Functions inherited from ProgressReporter | |
void | registerProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator) |
void | unregisterProgressIndicator (const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator) |
void | unregisterAllProgressIndicators () |
void | updateProgress (const unsigned long progress, const unsigned long total, const std::string &detail="") |
void | resetProgress () |
const std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > & | progressIndicators () const |
Valuation Engine.
The valuation engine's purpose is to generate an NPV cube. Its buildCube loops over samples->dates->trades and prices the portfolio under all samples and dates.
The number of dates is defined by the DateGrid passed to the constructor. The number of trades is defined by the size of the portfolio passed to buildCube(). The number of samples is defined by the NPVCube that is passed to buildCube(), this can be dynamic.
In addition to storing the resulting NPVs it can be given any number of calculators that can store additional values in the cube.
ValuationEngine | ( | const QuantLib::Date & | today, |
const QuantLib::ext::shared_ptr< ore::data::DateGrid > & | dg, | ||
const QuantLib::ext::shared_ptr< analytics::SimMarket > & | simMarket, | ||
const set< std::pair< std::string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder >>> & | modelBuilders = set< std::pair< std::string, QuantLib::ext::shared_ptr< QuantExt::ModelBuilder >>>() |
||
) |
Constructor.
today | Valuation date |
dg | Simulation date grid |
simMarket | Simulated market object |
modelBuilders | model builders to be updated |
void buildCube | ( | const QuantLib::ext::shared_ptr< data::Portfolio > & | portfolio, |
QuantLib::ext::shared_ptr< analytics::NPVCube > | outputCube, | ||
std::vector< QuantLib::ext::shared_ptr< ValuationCalculator >> | calculators, | ||
bool | mporStickyDate = true , |
||
QuantLib::ext::shared_ptr< analytics::NPVCube > | outputCubeNettingSet = nullptr , |
||
QuantLib::ext::shared_ptr< analytics::NPVCube > | outputCptyCube = nullptr , |
||
std::vector< QuantLib::ext::shared_ptr< CounterpartyCalculator >> | cptyCalculators = {} , |
||
bool | dryRun = false |
||
) |
Build NPV cube.
portfolio | Portfolio to be priced |
outputCube | Object for storing the results at trade level (e.g. NPVs, close-out NPVs, flows) |
calculators | Calculators to use |
mporStickyDate | Use sticky date in MPOR evaluation? |
outputCubeNettingSet | Output cube for netting set-level results |
outputCptyCube | Output cube for storing counterparty-level survival probabilities |
cptyCalculators | Calculators for filling counterparty-level results |
dryRun | Limit samples to one and fill the rest of the cube with random values |