volatility.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_VOLATILITYSURFACE_HPP
2 #define JULIAN_VOLATILITYSURFACE_HPP
3 
4 #include <string>
5 #include <dates/date.hpp>
6 #include <utils/smartPointer.hpp>
8 
9 namespace julian {
25  class Volatility {
26  public:
36  virtual double getVolatility(double K,Date T) const = 0;
43  virtual double getVolatility(double K,double T) const = 0;
50  virtual double getVariance(double K,Date T) const = 0;
51 
58  virtual double getVariance(double K,double T) const = 0;
61  virtual Date getDate() const = 0;
67  virtual void bumpVolatility(double h) = 0;
73  virtual double getYearFraction(Date,Date) const = 0;
76  virtual Volatility* clone() const = 0;
79  virtual std::string info() const = 0;
82  virtual ~Volatility(){};
83  };
84 } // namespace julian
85 #endif
File contains template of deep-coping smart pointer.
File contains interface for year fractions.
Definition: cadHoliday.cpp:3
virtual Volatility * clone() const =0
virtual copy constructor
virtual double getVolatility(double K, Date T) const =0
returns volatility for a give strike and date
virtual double getVariance(double K, Date T) const =0
returns variance for a give strike and date
File contains definition of date class.
The class interfaces volatility surface.
Definition: volatility.hpp:25
virtual std::string info() const =0
type of volatility surface
Class implements a date object.
Definition: date.hpp:27
Volatility()
default constructor
Definition: volatility.hpp:29
virtual ~Volatility()
destructor
Definition: volatility.hpp:82
virtual Date getDate() const =0
returns the date for which curve was defined.
virtual void bumpVolatility(double h)=0
bump volatility
virtual double getYearFraction(Date, Date) const =0
Calculates year fraction.