Logo
Reference manual - version orea_version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XvaRunner Class Reference

Public Member Functions

 XvaRunner (const QuantLib::ext::shared_ptr< InputParameters > &inputs, QuantLib::Date asof, const std::string &baseCurrency, const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio, const QuantLib::ext::shared_ptr< ore::data::NettingSetManager > &netting, const QuantLib::ext::shared_ptr< ore::data::CollateralBalances > &collateralBalances, const QuantLib::ext::shared_ptr< ore::data::EngineData > &engineData, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &todaysMarketParams, const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > &simMarketData, const QuantLib::ext::shared_ptr< ScenarioGeneratorData > &scenarioGeneratorData, const QuantLib::ext::shared_ptr< ore::data::CrossAssetModelData > &crossAssetModelData, const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceData=nullptr, const IborFallbackConfig &iborFallbackConfig=IborFallbackConfig::defaultConfig(), QuantLib::Real dimQuantile=0.99, QuantLib::Size dimHorizonCalendarDays=14, map< string, bool > analytics={}, string calculationType="Symmetric", string dvaName="", string fvaBorrowingCurve="", string fvaLendingCurve="", bool fullInitialCollateralisation=true, bool storeFlows=false)
 
void runXva (const QuantLib::ext::shared_ptr< ore::data::Market > &market, bool continueOnErr=true, const std::map< std::string, QuantLib::Real > &currentIM=std::map< std::string, QuantLib::Real >())
 
const QuantLib::ext::shared_ptr< PostProcess > & postProcess ()
 
void buildCamModel (const QuantLib::ext::shared_ptr< ore::data::Market > &market, bool continueOnErr=true)
 
void bufferSimulationPaths ()
 
virtual void buildSimMarket (const QuantLib::ext::shared_ptr< ore::data::Market > &market, const boost::optional< std::set< std::string >> &currencyFilter=boost::none, const bool continueOnErr=true)
 
void buildCube (const boost::optional< std::set< std::string >> &tradeIds, bool continueOnErr=true)
 
QuantLib::ext::shared_ptr< NPVCubenpvCube () const
 
QuantLib::ext::shared_ptr< NPVCubenettingCube () const
 
QuantLib::Handle< AggregationScenarioDataaggregationScenarioData ()
 
void generatePostProcessor (const QuantLib::ext::shared_ptr< Market > &market, const QuantLib::ext::shared_ptr< NPVCube > &npvCube, const QuantLib::ext::shared_ptr< NPVCube > &nettingCube, const QuantLib::ext::shared_ptr< AggregationScenarioData > &scenarioData, const bool continueOnErr=true, const std::map< std::string, QuantLib::Real > &currentIM=std::map< std::string, QuantLib::Real >())
 
std::set< std::string > getNettingSetIds (const QuantLib::ext::shared_ptr< Portfolio > &portfolio=nullptr) const
 

Protected Member Functions

virtual QuantLib::ext::shared_ptr< NPVCubegetNettingSetCube (std::vector< QuantLib::ext::shared_ptr< ValuationCalculator >> &calculators, const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
 
virtual QuantLib::ext::shared_ptr< NPVCubegetNpvCube (const Date &asof, const std::set< std::string > &ids, const std::vector< Date > &dates, const Size samples, const Size depth) const
 
virtual QuantLib::ext::shared_ptr< DynamicInitialMarginCalculatorgetDimCalculator (const QuantLib::ext::shared_ptr< NPVCube > &cube, const QuantLib::ext::shared_ptr< CubeInterpretation > &cubeInterpreter, const QuantLib::ext::shared_ptr< AggregationScenarioData > &scenarioData, const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > &model=nullptr, const QuantLib::ext::shared_ptr< NPVCube > &nettingCube=nullptr, const std::map< std::string, QuantLib::Real > &currentIM=std::map< std::string, QuantLib::Real >())
 
virtual QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParametersprojectSsmData (const std::set< std::string > &currencyFilter) const
 
virtual QuantLib::ext::shared_ptr< ore::analytics::ScenarioGeneratorgetProjectedScenarioGenerator (const boost::optional< std::set< std::string >> &currencyFilter, const QuantLib::ext::shared_ptr< Market > &market, const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > &projectedSsmData, const QuantLib::ext::shared_ptr< ScenarioFactory > &scenarioFactory, const bool continueOnErr) const
 

Protected Attributes

QuantLib::ext::shared_ptr< InputParametersinputs_
 
QuantLib::Date asof_
 
std::string baseCurrency_
 
QuantLib::ext::shared_ptr< ore::data::Portfolioportfolio_
 
QuantLib::ext::shared_ptr< ore::data::NettingSetManagernetting_
 
QuantLib::ext::shared_ptr< ore::data::CollateralBalancescollateralBalances_
 
QuantLib::ext::shared_ptr< ore::data::EngineDataengineData_
 
QuantLib::ext::shared_ptr< ore::data::CurveConfigurationscurveConfigs_
 
QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameterstodaysMarketParams_
 
QuantLib::ext::shared_ptr< ScenarioSimMarketParameterssimMarketData_
 
QuantLib::ext::shared_ptr< ScenarioGeneratorDatascenarioGeneratorData_
 
QuantLib::ext::shared_ptr< ore::data::CrossAssetModelDatacrossAssetModelData_
 
QuantLib::ext::shared_ptr< ReferenceDataManagerreferenceData_
 
IborFallbackConfig iborFallbackConfig_
 
QuantLib::Real dimQuantile_
 
QuantLib::Size dimHorizonCalendarDays_
 
map< string, bool > analytics_
 
string inputCalculationType_
 
string dvaName_
 
string fvaBorrowingCurve_
 
string fvaLendingCurve_
 
bool fullInitialCollateralisation_
 
bool storeFlows_
 
QuantLib::ext::shared_ptr< QuantExt::CrossAssetModelmodel_
 
QuantLib::ext::shared_ptr< ScenarioSimMarketsimMarket_
 
QuantLib::ext::shared_ptr< EngineFactorysimFactory_
 
QuantLib::RelinkableHandle< AggregationScenarioDatascenarioData_
 
QuantLib::ext::shared_ptr< NPVCubecube_
 
QuantLib::ext::shared_ptr< NPVCubenettingCube_
 
QuantLib::ext::shared_ptr< CubeInterpretationcubeInterpreter_
 
std::string calculationType_
 
QuantLib::ext::shared_ptr< PostProcesspostProcess_
 
QuantLib::ext::shared_ptr< std::vector< std::vector< QuantLib::Path > > > bufferedPaths_