Logo
Reference manual - version orea_version
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Analytic Class Reference
+ Inheritance diagram for Analytic:

Classes

struct  Configurations
 
class  Impl
 

Public Types

typedef std::map< std::string, std::map< std::string, boost::shared_ptr< ore::data::InMemoryReport > > > analytic_reports
 
typedef std::map< std::string, std::map< std::string, boost::shared_ptr< NPVCube > > > analytic_npvcubes
 
typedef std::map< std::string, std::map< std::string, boost::shared_ptr< AggregationScenarioData > > > analytic_mktcubes
 

Public Member Functions

 Analytic ()
 Constructors.
 
 Analytic (std::unique_ptr< Impl > impl, const std::set< std::string > &analyticTypes, const boost::shared_ptr< InputParameters > &inputs, bool simulationConfig=false, bool sensitivityConfig=false, bool scenarioGeneratorConfig=false, bool crossAssetModelConfig=false)
 
virtual void runAnalytic (const boost::shared_ptr< ore::data::InMemoryLoader > &loader, const std::set< std::string > &runTypes={})
 Run only those analytic types that are inclcuded in the runTypes vector, run all if the runType vector is empty.
 
virtual void buildConfigurations (const bool=false)
 
virtual void setUpConfigurations ()
 
virtual void buildMarket (const boost::shared_ptr< ore::data::InMemoryLoader > &loader, const bool marketRequired=true)
 
virtual void buildPortfolio ()
 
virtual void marketCalibration (const boost::shared_ptr< MarketCalibrationReportBase > &mcr=nullptr)
 
virtual void modifyPortfolio ()
 
virtual void replaceTrades ()
 
const std::string label () const
 Inspectors.
 
const std::set< std::string > & analyticTypes () const
 
const boost::shared_ptr< InputParameters > & inputs () const
 
const boost::shared_ptr< ore::data::Market > & market () const
 
boost::shared_ptr< MarketImplgetMarket () const
 
const boost::shared_ptr< ore::data::Portfolio > & portfolio () const
 
void setInputs (const QuantLib::ext::shared_ptr< InputParameters > &inputs)
 
void setMarket (const QuantLib::ext::shared_ptr< ore::data::Market > &market)
 
void setPortfolio (const QuantLib::ext::shared_ptr< ore::data::Portfolio > &portfolio)
 
std::vector< QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > > todaysMarketParams ()
 
const QuantLib::ext::shared_ptr< ore::data::Loader > & loader () const
 
Configurationsconfigurations ()
 
analytic_reports & reports ()
 Result reports.
 
analytic_npvcubes & npvCubes ()
 
analytic_mktcubes & mktCubes ()
 
const bool getWriteIntermediateReports () const
 
void setWriteIntermediateReports (const bool flag)
 
bool match (const std::set< std::string > &runTypes)
 Check whether any of the requested run types is covered by this analytic.
 
const std::unique_ptr< Impl > & impl ()
 
bool hasDependentAnalytic (const std::string &key)
 
template<class T >
QuantLib::ext::shared_ptr< T > dependentAnalytic (const std::string &key) const
 
const std::map< std::string, QuantLib::ext::shared_ptr< Analytic > > & dependentAnalytics () const
 
std::vector< QuantLib::ext::shared_ptr< Analytic > > allDependentAnalytics () const
 
virtual std::set< QuantLib::Date > marketDates () const
 

Protected Attributes

std::set< std::string > types_
 list of analytic types run by this analytic
 
QuantLib::ext::shared_ptr< InputParametersinputs_
 contains all the input parameters for the run
 
Configurations configurations_
 
boost::shared_ptr< ore::data::Marketmarket_
 
boost::shared_ptr< ore::data::Loaderloader_
 
boost::shared_ptr< ore::data::Portfolioportfolio_
 
analytic_reports reports_
 
analytic_npvcubes npvCubes_
 
analytic_mktcubes mktCubes_
 
bool writeIntermediateReports_ = true
 
std::map< std::string, boost::shared_ptr< Analytic > > dependentAnalytics_
 

Constructor & Destructor Documentation

◆ Analytic()

Analytic ( std::unique_ptr< Impl impl,
const std::set< std::string > &  analyticTypes,
const boost::shared_ptr< InputParameters > &  inputs,
bool  simulationConfig = false,
bool  sensitivityConfig = false,
bool  scenarioGeneratorConfig = false,
bool  crossAssetModelConfig = false 
)
Parameters
implConcrete implementation of the analytic
analyticTypesThe types of all (sub) analytics covered by this Analytic object e.g. NPV, CASHFLOW, CASHFLOWNPV, etc., covered by the PricingAnalytic
inputsAny inputs required by this Analytic
simulationConfigFlag to indicate whether a simulation config file is required for this analytic
sensitivityConfigFlag to indicate whether a sensitivity config file is required for this analytic
scenarioGeneratorConfigFlag to indicate whether a scenario generator config file is required for this analytic
crossAssetModelConfigFlag to indicate whether a cross asset model config file is required for this analytic

Member Data Documentation

◆ writeIntermediateReports_

bool writeIntermediateReports_ = true
protected

Whether to write intermediate reports or not. This would typically be used when the analytic is being called by another analytic and that parent/calling analytic will be writing its own set of intermediate reports