32 static constexpr const char*
LABEL =
"XVA";
35 const QuantLib::ext::shared_ptr<InputParameters>& inputs,
36 const QuantLib::ext::shared_ptr<Scenario>& offsetScenario =
nullptr,
37 const QuantLib::ext::shared_ptr<ScenarioSimMarketParameters>& offsetSimMarketParams =
nullptr)
40 "Need offsetScenario and corresponding simMarketParameter");
43 virtual void runAnalytic(
const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader,
44 const std::set<std::string>& runTypes = {})
override;
50 QuantLib::ext::shared_ptr<ore::data::EngineFactory>
engineFactory()
override;
56 void initCube(QuantLib::ext::shared_ptr<NPVCube>& cube,
const std::set<std::string>& ids, Size cubeDepth);
58 void initClassicRun(
const QuantLib::ext::shared_ptr<Portfolio>& portfolio);
59 void buildClassicCube(
const QuantLib::ext::shared_ptr<Portfolio>& portfolio);
60 QuantLib::ext::shared_ptr<Portfolio>
classicRun(
const QuantLib::ext::shared_ptr<Portfolio>& portfolio);
62 QuantLib::ext::shared_ptr<EngineFactory>
63 amcEngineFactory(
const QuantLib::ext::shared_ptr<QuantExt::CrossAssetModel>& cam,
const std::vector<Date>& grid);
65 void amcRun(
bool doClassicRun);
75 QuantLib::ext::shared_ptr<CrossAssetModel>
model_;
86 QuantLib::ext::shared_ptr<DateGrid>
grid_;
93static const std::set<std::string> xvaAnalyticSubAnalytics{
"XVA",
"EXPOSURE"};
98 const QuantLib::ext::shared_ptr<Scenario>& offSetScenario =
nullptr,
99 const QuantLib::ext::shared_ptr<ScenarioSimMarketParameters>& offsetSimMarketParams =
nullptr)
101 xvaAnalyticSubAnalytics,
inputs, false, false, false, false) {}
void setLabel(const string &label)
const QuantLib::ext::shared_ptr< InputParameters > & inputs() const
XvaAnalytic(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< Scenario > &offSetScenario=nullptr, const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > &offsetSimMarketParams=nullptr)
void setUpConfigurations() override
void buildClassicCube(const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
QuantLib::ext::shared_ptr< ScenarioSimMarket > simMarketCalibration_
QuantLib::ext::shared_ptr< NPVCube > amcCube_
QuantLib::ext::shared_ptr< CubeInterpretation > cubeInterpreter_
virtual void runAnalytic(const QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader, const std::set< std::string > &runTypes={}) override
void amcRun(bool doClassicRun)
QuantLib::ext::shared_ptr< ScenarioSimMarket > simMarket_
QuantLib::ext::shared_ptr< ScenarioGenerator > scenarioGenerator_
QuantLib::RelinkableHandle< AggregationScenarioData > scenarioData_
void buildScenarioSimMarket()
QuantLib::ext::shared_ptr< EngineFactory > engineFactory_
QuantLib::ext::shared_ptr< DateGrid > grid_
QuantLib::ext::shared_ptr< CrossAssetModel > model_
QuantLib::ext::shared_ptr< Portfolio > amcPortfolio_
QuantLib::ext::shared_ptr< EngineFactory > amcEngineFactory(const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > &cam, const std::vector< Date > &grid)
void checkConfigurations(const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
XvaAnalyticImpl(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< Scenario > &offsetScenario=nullptr, const QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > &offsetSimMarketParams=nullptr)
QuantLib::ext::shared_ptr< DynamicInitialMarginCalculator > dimCalculator_
void initClassicRun(const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
QuantLib::ext::shared_ptr< Scenario > offsetScenario_
QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > offsetSimMarketParams_
void buildScenarioGenerator(bool continueOnError)
void buildCrossAssetModel(bool continueOnError)
QuantLib::ext::shared_ptr< NPVCube > cptyCube_
QuantLib::ext::shared_ptr< ore::data::EngineFactory > engineFactory() override
build an engine factory
void initCube(QuantLib::ext::shared_ptr< NPVCube > &cube, const std::set< std::string > &ids, Size cubeDepth)
QuantLib::ext::shared_ptr< Portfolio > classicRun(const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
QuantLib::ext::shared_ptr< PostProcess > postProcess_
QuantLib::ext::shared_ptr< Portfolio > classicPortfolio_
static constexpr const char * LABEL
Matrix creditStateCorrelationMatrix() const
QuantLib::ext::shared_ptr< NPVCube > cube_
QuantLib::ext::shared_ptr< ScenarioSimMarket > offsetSimMarket_
QuantLib::ext::shared_ptr< NPVCube > nettingSetCube_