Logo
Reference manual - version orea_version
Public Member Functions | Friends | List of all members
Scenario Class Referenceabstract

Scenario Base Class. More...

#include <orea/scenario/scenario.hpp>

+ Inheritance diagram for Scenario:

Public Member Functions

virtual ~Scenario ()
 Destructor.
 
virtual const Date & asof () const =0
 Return the scenario asof date.
 
virtual void setAsof (const Date &d)=0
 Set the asof date.
 
virtual const string & label () const =0
 Get the scenario label.
 
virtual void label (const string &)=0
 Set the scenario label.
 
virtual Real getNumeraire () const =0
 Get Numeraire ratio n = N(t) / N(0) so that Price(0) = N(0) * E [Price(t) / N(t) ].
 
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) ].
 
virtual bool has (const RiskFactorKey &key) const =0
 Check whether this scenario provides the data for the given key.
 
virtual const std::vector< RiskFactorKey > & keys () const =0
 Risk factor keys for which this scenario provides data.
 
virtual void add (const RiskFactorKey &key, Real value)=0
 Add an element to the scenario.
 
virtual Real get (const RiskFactorKey &key) const =0
 Get an element from the scenario.
 
virtual bool isAbsolute () const =0
 Is this an absolute or difference scenario?
 
virtual void setAbsolute (const bool b)=0
 Set if this is an absolute scenario.
 
virtual const std::map< std::pair< RiskFactorKey::KeyType, std::string >, std::vector< std::vector< Real > > > & coordinates () const =0
 Get coordinates.
 
virtual QuantLib::ext::shared_ptr< Scenarioclone () const =0
 clones a scenario and returns a pointer to the new object
 
virtual bool isCloseEnough (const QuantLib::ext::shared_ptr< Scenario > &s) const
 checks for equality up to numerical differences
 
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
 

Friends

class boost::serialization::access
 

Detailed Description

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.