#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 |
| void | setAsof (const Date &d) override |
| const std::string & | label () const override |
| Return the scenario label. | |
| void | label (const std::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 |
| const std::vector< ore::analytics::RiskFactorKey > & | delta_keys () const |
| void | add (const ore::analytics::RiskFactorKey &key, Real value) override |
| Real | get (const ore::analytics::RiskFactorKey &key) const override |
| const bool | isAbsolute () const override |
| void | setAbsolute (const bool b) override |
| const bool | isPar () const override |
| void | setPar (const bool b) override |
| const std::map< std::pair< RiskFactorKey::KeyType, std::string >, std::vector< std::vector< Real > > > & | coordinates () const override |
| 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 |
| bool | isCloseEnough (const QuantLib::ext::shared_ptr< Scenario > &s) const override |
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.