Class for reading historical scenarios from a csv file. More...
#include <orea/scenario/historicalscenariofilereader.hpp>
Inheritance diagram for HistoricalScenarioFileReader:
Collaboration diagram for HistoricalScenarioFileReader:Public Member Functions | |
| HistoricalScenarioFileReader (const std::string &fileName, const QuantLib::ext::shared_ptr< ScenarioFactory > &scenarioFactory) | |
| ~HistoricalScenarioFileReader () override | |
| Destructor. More... | |
| bool | next () override |
| Return true if there is another Scenario to read and move to it. More... | |
| QuantLib::Date | date () const override |
Return the current scenario's date if reader is still valid and Null<Date>() otherwise. More... | |
| QuantLib::ext::shared_ptr< Scenario > | scenario () const override |
Return the current scenario if reader is still valid and nullptr otherwise. More... | |
Public Member Functions inherited from HistoricalScenarioReader | |
| virtual | ~HistoricalScenarioReader () |
| Destructor. More... | |
| virtual bool | next ()=0 |
| Return true if there is another Scenario to read and move to it. More... | |
| virtual QuantLib::Date | date () const =0 |
Return the current scenario's date if reader is still valid and Null<Date>() otherwise. More... | |
| virtual QuantLib::ext::shared_ptr< ore::analytics::Scenario > | scenario () const =0 |
Return the current scenario if reader is still valid and nullptr otherwise. More... | |
| virtual void | load (const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simParams, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &marketParams) |
Private Attributes | |
| QuantLib::ext::shared_ptr< ScenarioFactory > | scenarioFactory_ |
| Scenario factory. More... | |
| ore::data::CSVFileReader | file_ |
| Handle on the csv file. More... | |
| std::vector< RiskFactorKey > | keys_ |
| The risk factor keys of the scenarios in the file. More... | |
| bool | finished_ |
| Flag indicating if the reader has no more scenarios to read. More... | |
Class for reading historical scenarios from a csv file.
Definition at line 37 of file historicalscenariofilereader.hpp.
| HistoricalScenarioFileReader | ( | const std::string & | fileName, |
| const QuantLib::ext::shared_ptr< ScenarioFactory > & | scenarioFactory | ||
| ) |
Constructor where filename gives the path to the file from which to read the scenarios and scenarioFactory is a factory for building Scenarios
Definition at line 34 of file historicalscenariofilereader.cpp.
Here is the call graph for this function:
|
override |
Destructor.
Definition at line 51 of file historicalscenariofilereader.cpp.
Here is the call graph for this function:
|
overridevirtual |
Return true if there is another Scenario to read and move to it.
Implements HistoricalScenarioReader.
Definition at line 57 of file historicalscenariofilereader.cpp.
Here is the call graph for this function:
|
overridevirtual |
Return the current scenario's date if reader is still valid and Null<Date>() otherwise.
Implements HistoricalScenarioReader.
Definition at line 62 of file historicalscenariofilereader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Return the current scenario if reader is still valid and nullptr otherwise.
Implements HistoricalScenarioReader.
Definition at line 70 of file historicalscenariofilereader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Scenario factory.
Definition at line 55 of file historicalscenariofilereader.hpp.
|
private |
Handle on the csv file.
Definition at line 57 of file historicalscenariofilereader.hpp.
|
private |
The risk factor keys of the scenarios in the file.
Definition at line 59 of file historicalscenariofilereader.hpp.
|
private |
Flag indicating if the reader has no more scenarios to read.
Definition at line 61 of file historicalscenariofilereader.hpp.