Simple Scenario class. More...
#include <orea/scenario/simplescenario.hpp>
Public Member Functions | |
SimpleScenario () | |
Constructor. | |
SimpleScenario (Date asof, const std::string &label="", Real numeraire=0) | |
Constructor. | |
const Date & | asof () const override |
Return the scenario asof date. | |
const std::string & | label () const override |
Return the scenario label. | |
void | label (const string &s) override |
set the label | |
Real | getNumeraire () const override |
Get Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ]. | |
void | setNumeraire (Real n) override |
Set the Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ]. | |
bool | has (const RiskFactorKey &key) const override |
Check, get, add a single market point. | |
const std::vector< RiskFactorKey > & | keys () const override |
Risk factor keys for which this scenario provides data. | |
void | add (const RiskFactorKey &key, Real value) override |
Add an element to the scenario. | |
Real | get (const RiskFactorKey &key) const override |
Get an element from the scenario. | |
boost::shared_ptr< Scenario > | clone () const override |
clones a scenario and returns a pointer to the new object | |
const std::map< RiskFactorKey, Real > | data () const |
get data map | |
Public Member Functions inherited from Scenario | |
virtual | ~Scenario () |
Destructor. | |
Friends | |
class | boost::serialization::access |
Simple Scenario class.
This implementation stores the data in several maps within in each scenario class instance. This contains redundant information (keys) across scenario instances which can cause issues when many scenario instances are managed in memory.