Logo
Reference manual - version orea_version
SimpleScenarioLoader Class Reference

Class for loading historical scenarios. More...

#include <orea/scenario/scenarioloader.hpp>

Inheritance diagram for SimpleScenarioLoader:

Public Member Functions

 SimpleScenarioLoader ()
 Default constructor.
 SimpleScenarioLoader (const QuantLib::ext::shared_ptr< ScenarioReader > &scenarioReader)
QuantLib::Size samples ()
Public Member Functions inherited from ScenarioLoader
QuantLib::Size numScenarios () const
 Number of scenarios.
const std::map< QuantLib::Date, QuantLib::ext::shared_ptr< ore::analytics::Scenario > > & getScenarios (Size i)
std::vector< std::map< QuantLib::Date, QuantLib::ext::shared_ptr< ore::analytics::Scenario > > > & scenarios ()
 Set scenarios.
const std::vector< std::map< QuantLib::Date, QuantLib::ext::shared_ptr< ore::analytics::Scenario > > > & scenarios () const
 The scenarios.
void add (const QuantLib::Date &date, Size index, const QuantLib::ext::shared_ptr< ore::analytics::Scenario > &scenario)

Protected Attributes

std::map< std::string, QuantLib::Size > indexMap_
Protected Attributes inherited from ScenarioLoader
std::vector< std::map< QuantLib::Date, QuantLib::ext::shared_ptr< ore::analytics::Scenario > > > scenarios_

Detailed Description

Class for loading historical scenarios.

Constructor & Destructor Documentation

◆ SimpleScenarioLoader()

SimpleScenarioLoader ( const QuantLib::ext::shared_ptr< ScenarioReader > & scenarioReader)

Constructor that loads scenarios, read from scenarioReader

Warning
The scenarios coming from scenarioReader must be in ascending order. If not, an exception is thrown.
Parameters
scenarioReaderA scenario reader that feeds the loader with scenarios