Logo
Reference manual - version orea_version
Public Member Functions | Friends | List of all members
SimpleScenario Class Reference

Simple Scenario class. More...

#include <orea/scenario/simplescenario.hpp>

+ Inheritance diagram for SimpleScenario:

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< Scenarioclone () 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
 

Detailed Description

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.