#include <orea/scenario/scenario.hpp>
Public Member Functions | |
virtual | ~Scenario () |
Destructor. More... | |
virtual const Date & | asof () const =0 |
Return the scenario asof date. More... | |
virtual void | setAsof (const Date &d)=0 |
Set the asof date. More... | |
virtual const string & | label () const =0 |
Get the scenario label. More... | |
virtual void | label (const string &)=0 |
Set the scenario label. More... | |
virtual Real | getNumeraire () const =0 |
Get Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ]. More... | |
virtual void | setNumeraire (Real n)=0 |
Set the Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ]. More... | |
virtual bool | has (const RiskFactorKey &key) const =0 |
Check whether this scenario provides the data for the given key. More... | |
virtual const std::vector< RiskFactorKey > & | keys () const =0 |
Risk factor keys for which this scenario provides data. More... | |
virtual void | add (const RiskFactorKey &key, Real value)=0 |
Add an element to the scenario. More... | |
virtual Real | get (const RiskFactorKey &key) const =0 |
Get an element from the scenario. More... | |
virtual bool | isAbsolute () const =0 |
Is this an absolute or difference scenario? More... | |
virtual void | setAbsolute (const bool b)=0 |
Set if this is an absolute scenario. More... | |
virtual const std::map< std::pair< RiskFactorKey::KeyType, std::string >, std::vector< std::vector< Real > > > & | coordinates () const =0 |
Get coordinates. More... | |
virtual QuantLib::ext::shared_ptr< Scenario > | clone () const =0 |
clones a scenario and returns a pointer to the new object More... | |
virtual bool | isCloseEnough (const QuantLib::ext::shared_ptr< Scenario > &s) const |
checks for equality up to numerical differences More... | |
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 More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
Friends | |
class | boost::serialization::access |
Scenario Base Class.
A scenario contains a single cross asset model sample in terms of yield curves by currency, FX rates, etc.
This base class provides the interface to add and retrieve data to and from a scenario. Concrete simple and memory optimized "compact" scenario classes are derived from this.
Definition at line 138 of file scenario.hpp.
|
virtual |
|
pure virtual |
Return the scenario asof date.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Set the asof date.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Get the scenario label.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Set the scenario label.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Get Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ].
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Set the Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ].
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Check whether this scenario provides the data for the given key.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Risk factor keys for which this scenario provides data.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Add an element to the scenario.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Get an element from the scenario.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Is this an absolute or difference scenario?
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Set if this is an absolute scenario.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
Get coordinates.
Implemented in DeltaScenario, and SimpleScenario.
|
pure virtual |
clones a scenario and returns a pointer to the new object
Implemented in DeltaScenario, and SimpleScenario.
checks for equality up to numerical differences
Reimplemented in DeltaScenario.
Definition at line 38 of file scenario.cpp.
|
virtual |
return fingerprint identifying the set of rf keys of the scenarios, or 0 if not provided by the implementation
Reimplemented in SimpleScenario.
Definition at line 182 of file scenario.hpp.
|
private |
Definition at line 186 of file scenario.hpp.
|
friend |
Definition at line 185 of file scenario.hpp.