marketModel.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_MARKETMODEL_HPP
2 #define JULIAN_MARKETMODEL_HPP
3 
7 #include <map>
8 
9 namespace julian {
10  class EuropeanOpt;
11 
25  class MarketModel {
26  public:
27  MarketModel(){};
28 
31  virtual Date getDate() const = 0;
32 
35  virtual double getAssetPrize() const = 0;
36 
39  virtual SmartPointer<ir::Curve> getDiscountingCurve() const = 0;
40 
43  virtual SmartPointer<ir::Curve> getDividendCurve() const = 0;
44 
49  virtual void setDate(Date& date) = 0;
50 
55  virtual void setAssetPrize(double prize) = 0;
56 
61  virtual void bumpAssetPrize(double h) = 0;
62 
68  virtual void bumpVolatility(double h) = 0;
69 
72  virtual double prizeAnalytically(const EuropeanOpt& opt) const = 0;
73 
74 
77  virtual MarketModel* clone() const = 0;
78 
81  virtual ~MarketModel() {
82  }
83  };
84 
90  template<typename T>
92  public:
95  virtual MarketModel* clone() const {
96  return new T(static_cast<const T&>(*this));
97  }
98  };
99 } // namespace julian
100 
101 
102 #endif /* MARKETMODEL_HPP */
virtual double getAssetPrize() const =0
returns the prize of asset
virtual MarketModel * clone() const
virtual copy constructor
Definition: marketModel.hpp:95
Interface for objects representing market models.
Definition: marketModel.hpp:25
Definition: cadHoliday.cpp:3
virtual Date getDate() const =0
returns the date on which market data are actual
virtual SmartPointer< ir::Curve > getDividendCurve() const =0
returns dividend curve
Class uses Curiously Recurring Template Pattern to implement polymorphic copy construction in every d...
Definition: marketModel.hpp:91
virtual void setAssetPrize(double prize)=0
sets asset prize
virtual void setDate(Date &date)=0
sets the market date
virtual void bumpAssetPrize(double h)=0
bump asset prize additively
virtual ~MarketModel()
destructor
Definition: marketModel.hpp:81
File contains definition of forward curve class.
Class implements Plain Vanilla European Option.
Definition: europeanOpt.hpp:22
Class implements a date object.
Definition: date.hpp:27
virtual SmartPointer< ir::Curve > getDiscountingCurve() const =0
returns discounting curve
virtual MarketModel * clone() const =0
virtual copy constructor
virtual void bumpVolatility(double h)=0
bump volatility additively
File contains interface of interest rate curves.
File contains interface for stochastic processes.
virtual double prizeAnalytically(const EuropeanOpt &opt) const =0
prize EuropeanOpt analytically