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

Delta Scenario class. More...

#include <orea/scenario/deltascenario.hpp>

+ Inheritance diagram for DeltaScenario:

Public Member Functions

 DeltaScenario ()
 Constructor.
 
 DeltaScenario (const boost::shared_ptr< ore::analytics::Scenario > &baseScenario, const boost::shared_ptr< ore::analytics::Scenario > &incrementalScenario)
 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 ore::analytics::RiskFactorKey &key) const override
 Check, get, add a single market point.
 
const std::vector< ore::analytics::RiskFactorKey > & keys () const override
 Risk factor keys for which this scenario provides data.
 
void add (const ore::analytics::RiskFactorKey &key, Real value) override
 Add an element to the scenario.
 
Real get (const ore::analytics::RiskFactorKey &key) const override
 Get an element from the scenario.
 
boost::shared_ptr< Scenariodelta () const
 Get delta.
 
boost::shared_ptr< Scenarioclone () const override
 clones a scenario and returns a pointer to the new object
 
- Public Member Functions inherited from Scenario
virtual ~Scenario ()
 Destructor.
 

Protected Attributes

boost::shared_ptr< ScenariobaseScenario_
 
boost::shared_ptr< Scenariodelta_
 

Friends

class boost::serialization::access
 

Detailed Description

Delta Scenario class.

This implementation stores a pointer to a "base scenario", as well as a smaller "delta" scenario, which stores values for any keys where the value is different to base. This is intended as an efficient storage mechanism for e.g. sensitivity scenarios, where many scenario instances are managed in memory but the actual differences are minor.