Class for loading historical scenarios.
More...
#include <orea/scenario/scenarioloader.hpp>
|
|
| HistoricalScenarioLoader () |
| | Default constructor.
|
| | HistoricalScenarioLoader (const QuantLib::ext::shared_ptr< ScenarioReader > &scenarioReader, const QuantLib::Date &startDate, const QuantLib::Date &endDate, const QuantLib::Calendar &calendar) |
| | HistoricalScenarioLoader (const QuantLib::ext::shared_ptr< ScenarioReader > &scenarioReader, const std::set< QuantLib::Date > &dates) |
| | HistoricalScenarioLoader (const std::vector< QuantLib::ext::shared_ptr< ore::analytics::Scenario > > &scenarios, const std::set< QuantLib::Date > &dates) |
|
QuantLib::ext::shared_ptr< ore::analytics::Scenario > | getScenario (const QuantLib::Date &date) const |
| | Get a Scenario for a given date.
|
|
std::vector< QuantLib::Date > | dates () |
|
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) |
|
|
std::vector< std::map< QuantLib::Date, QuantLib::ext::shared_ptr< ore::analytics::Scenario > > > | scenarios_ |
Class for loading historical scenarios.
◆ HistoricalScenarioLoader() [1/3]
| HistoricalScenarioLoader |
( |
const QuantLib::ext::shared_ptr< ScenarioReader > & | scenarioReader, |
|
|
const QuantLib::Date & | startDate, |
|
|
const QuantLib::Date & | endDate, |
|
|
const QuantLib::Calendar & | calendar ) |
Constructor that loads scenarios, read from scenarioReader, between startDate and endDate.
- Warning
- The scenarios coming from
scenarioReader must be in ascending order. If not, an exception is thrown.
- Parameters
-
| scenarioReader | A scenario reader that feeds the loader with scenarios |
| startDate | The first date to load a scenario for |
| endDate | The last date to load a scenario for |
| calendar | Calendar to use when advancing dates |
◆ HistoricalScenarioLoader() [2/3]
| HistoricalScenarioLoader |
( |
const QuantLib::ext::shared_ptr< ScenarioReader > & | scenarioReader, |
|
|
const std::set< QuantLib::Date > & | dates ) |
Constructor that loads scenarios, read from scenarioReader, for given dates
- Parameters
-
| scenarioReader | A scenario reader that feeds the loader with scenarios |
| dates | The first date to load a scenario for |
◆ HistoricalScenarioLoader() [3/3]
| HistoricalScenarioLoader |
( |
const std::vector< QuantLib::ext::shared_ptr< ore::analytics::Scenario > > & | scenarios, |
|
|
const std::set< QuantLib::Date > & | dates ) |
Constructor that loads scenarios from a vector
- Parameters
-
| scenarios | A vector of scenarios |
| dates | The first date to load a a scenario for |