Class for loading historical scenarios. More...
#include <orea/scenario/historicalscenarioloader.hpp>
Public Member Functions | |
HistoricalScenarioLoader () | |
Default constructor. | |
HistoricalScenarioLoader (const QuantLib::ext::shared_ptr< HistoricalScenarioReader > &scenarioReader, const QuantLib::Date &startDate, const QuantLib::Date &endDate, const QuantLib::Calendar &calendar) | |
HistoricalScenarioLoader (const boost::shared_ptr< HistoricalScenarioReader > &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 > | getHistoricalScenario (const QuantLib::Date &date) const |
Get a Scenario for a given date. | |
QuantLib::Size | numScenarios () const |
Number of scenarios. | |
std::vector< QuantLib::ext::shared_ptr< ore::analytics::Scenario > > & | historicalScenarios () |
Set historical scenarios. | |
const std::vector< QuantLib::ext::shared_ptr< ore::analytics::Scenario > > & | historicalScenarios () const |
The historical scenarios. | |
std::vector< QuantLib::Date > & | dates () |
Set historical scenario dates. | |
const std::vector< QuantLib::Date > & | dates () const |
The historical scenario dates. | |
Protected Attributes | |
std::vector< QuantLib::ext::shared_ptr< ore::analytics::Scenario > > | historicalScenarios_ |
std::vector< QuantLib::Date > | dates_ |
Class for loading historical scenarios.
HistoricalScenarioLoader | ( | const QuantLib::ext::shared_ptr< HistoricalScenarioReader > & | scenarioReader, |
const QuantLib::Date & | startDate, | ||
const QuantLib::Date & | endDate, | ||
const QuantLib::Calendar & | calendar | ||
) |
Constructor that loads scenarios, read from scenarioReader
, between startDate
and endDate
.
scenarioReader
must be in ascending order. If not, an exception is thrown. scenarioReader | A scenario reader that feeds the loader with scenarios |
startDate | The first date to load a a scenario for |
endDate | The last date to load a scenario for |
calendar | Calendar to use when advancing dates |
HistoricalScenarioLoader | ( | const boost::shared_ptr< HistoricalScenarioReader > & | scenarioReader, |
const std::set< QuantLib::Date > & | dates | ||
) |
Constructor that loads scenarios, read from scenarioReader
, for given dates
scenarioReader | A scenario reader that feeds the loader with scenarios |
dates | The first date to load a a scenario for |
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
scenarios | A vector of scenarios |
dates | The first date to load a a scenario for |