@@ -224,100 +224,6 @@ class MarketDataAnalytic : public Analytic {
224224 : Analytic(std::make_unique<MarketDataAnalyticImpl>(inputs), {" MARKETDATA" }, inputs) {}
225225};
226226
227- /* ! Pricing-type analytics
228- \todo align pillars for par sensitivity analysis
229- */
230- class PricingAnalyticImpl : public Analytic ::Impl {
231- public:
232- static constexpr const char * LABEL = " PRICING" ;
233-
234- PricingAnalyticImpl (const boost::shared_ptr<InputParameters>& inputs) : Analytic::Impl(inputs) { setLabel (LABEL); }
235- void runAnalytic (const boost::shared_ptr<ore::data::InMemoryLoader>& loader,
236- const std::set<std::string>& runTypes = {}) override ;
237-
238- void setUpConfigurations () override ;
239- };
240-
241- class PricingAnalytic : public Analytic {
242- public:
243- PricingAnalytic (const boost::shared_ptr<InputParameters>& inputs)
244- : Analytic(std::make_unique<PricingAnalyticImpl>(inputs),
245- {" NPV" , " NPV_LAGGED" , " CASHFLOW" , " CASHFLOWNPV" , " SENSITIVITY" , " STRESS" },
246- inputs) {}
247- };
248-
249- class VarAnalyticImpl : public Analytic ::Impl {
250- public:
251- static constexpr const char * LABEL = " VAR" ;
252-
253- VarAnalyticImpl (const boost::shared_ptr<InputParameters>& inputs) : Analytic::Impl(inputs) { setLabel (LABEL); }
254- void runAnalytic (const boost::shared_ptr<ore::data::InMemoryLoader>& loader,
255- const std::set<std::string>& runTypes = {}) override ;
256- void setUpConfigurations () override ;
257- };
258-
259- class VarAnalytic : public Analytic {
260- public:
261- VarAnalytic (const boost::shared_ptr<InputParameters>& inputs)
262- : Analytic(std::make_unique<VarAnalyticImpl>(inputs), {" VAR" }, inputs, false , false , false , false ) {}
263- };
264-
265- class XvaAnalyticImpl : public Analytic ::Impl {
266- public:
267- static constexpr const char * LABEL = " XVA" ;
268-
269- XvaAnalyticImpl (const boost::shared_ptr<InputParameters>& inputs) : Analytic::Impl(inputs) { setLabel (LABEL); }
270- virtual void runAnalytic (const boost::shared_ptr<ore::data::InMemoryLoader>& loader,
271- const std::set<std::string>& runTypes = {}) override ;
272- void setUpConfigurations () override ;
273-
274- void checkConfigurations (const boost::shared_ptr<Portfolio>& portfolio);
275-
276- protected:
277- boost::shared_ptr<ore::data::EngineFactory> engineFactory () override ;
278- void buildScenarioSimMarket ();
279- void buildCrossAssetModel (bool continueOnError);
280- void buildScenarioGenerator (bool continueOnError);
281-
282- void initCubeDepth ();
283- void initCube (boost::shared_ptr<NPVCube>& cube, const std::set<std::string>& ids, Size cubeDepth);
284-
285- void initClassicRun (const boost::shared_ptr<Portfolio>& portfolio);
286- void buildClassicCube (const boost::shared_ptr<Portfolio>& portfolio);
287- boost::shared_ptr<Portfolio> classicRun (const boost::shared_ptr<Portfolio>& portfolio);
288-
289- boost::shared_ptr<EngineFactory> amcEngineFactory (const boost::shared_ptr<QuantExt::CrossAssetModel>& cam,
290- const std::vector<Date>& grid);
291- void buildAmcPortfolio ();
292- void amcRun (bool doClassicRun);
293-
294- void runPostProcessor ();
295-
296- boost::shared_ptr<ScenarioSimMarket> simMarket_;
297- boost::shared_ptr<EngineFactory> engineFactory_;
298- boost::shared_ptr<CrossAssetModel> model_;
299- boost::shared_ptr<ScenarioGenerator> scenarioGenerator_;
300- boost::shared_ptr<Portfolio> amcPortfolio_, classicPortfolio_;
301- boost::shared_ptr<NPVCube> cube_, nettingSetCube_, cptyCube_, amcCube_;
302- QuantLib::RelinkableHandle<AggregationScenarioData> scenarioData_;
303- boost::shared_ptr<CubeInterpretation> cubeInterpreter_;
304- boost::shared_ptr<DynamicInitialMarginCalculator> dimCalculator_;
305- boost::shared_ptr<PostProcess> postProcess_;
306-
307- Size cubeDepth_ = 0 ;
308- boost::shared_ptr<DateGrid> grid_;
309- Size samples_ = 0 ;
310-
311- bool runSimulation_ = false ;
312- bool runXva_ = false ;
313- };
314-
315- class XvaAnalytic : public Analytic {
316- public:
317- XvaAnalytic (const boost::shared_ptr<InputParameters>& inputs)
318- : Analytic(std::make_unique<XvaAnalyticImpl>(inputs), {" XVA" , " EXPOSURE" }, inputs, false , false , false , false ) {}
319- };
320-
321227template <class T > inline boost::shared_ptr<T> Analytic::dependentAnalytic (const std::string& key) const {
322228 auto it = dependentAnalytics_.find (key);
323229 QL_REQUIRE (it != dependentAnalytics_.end (), " Could not find dependent Analytic " << key);
@@ -326,6 +232,5 @@ template <class T> inline boost::shared_ptr<T> Analytic::dependentAnalytic(const
326232 return analytic;
327233}
328234
329-
330235} // namespace analytics
331236} // namespace oreplus
0 commit comments