#include <orea/scenario/deltascenario.hpp>
Public Member Functions | |
DeltaScenario () | |
Constructor. | |
DeltaScenario (const QuantLib::ext::shared_ptr< ore::analytics::Scenario > &baseScenario, const QuantLib::ext::shared_ptr< ore::analytics::Scenario > &incrementalScenario) | |
Constructor. | |
const Date & | asof () const override |
Return the scenario asof date. | |
void | setAsof (const Date &d) override |
Set the 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. | |
bool | isAbsolute () const override |
Is this an absolute or difference scenario? | |
void | setAbsolute (const bool b) override |
Set if this is an absolute scenario. | |
const std::map< std::pair< RiskFactorKey::KeyType, std::string >, std::vector< std::vector< Real > > > & | coordinates () const override |
Get coordinates. | |
QuantLib::ext::shared_ptr< Scenario > | base () const |
Get base. | |
QuantLib::ext::shared_ptr< Scenario > | delta () const |
Get delta. | |
QuantLib::ext::shared_ptr< Scenario > | clone () const override |
clones a scenario and returns a pointer to the new object | |
bool | isCloseEnough (const QuantLib::ext::shared_ptr< Scenario > &s) const override |
checks for equality up to numerical differences | |
Public Member Functions inherited from Scenario | |
virtual | ~Scenario () |
Destructor. | |
virtual std::size_t | keysHash () const |
return fingerprint identifying the set of rf keys of the scenarios, or 0 if not provided by the implementation | |
Protected Attributes | |
QuantLib::ext::shared_ptr< Scenario > | baseScenario_ |
QuantLib::ext::shared_ptr< Scenario > | delta_ |
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.