#include <orea/scenario/deltascenario.hpp>
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< Scenario > | delta () const |
Get delta. | |
boost::shared_ptr< Scenario > | clone () 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< Scenario > | baseScenario_ |
boost::shared_ptr< Scenario > | delta_ |
Friends | |
class | boost::serialization::access |
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.