pricingEngine.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_PRICINGENGINE_HPP
2 #define JULIAN_PRICINGENGINE_HPP
3 
4 #include <utils/smartPointer.hpp>
7 
8 namespace julian {
9 
20  class PricingEngine {
21  public:
24  virtual double prize(const SmartPointer<MarketModel>&,const SmartPointer<Option>&) const = 0;
25 
28  virtual PricingEngine* clone() const = 0;
29 
32  virtual ~PricingEngine(){};
33  };
34 
35 
41  template<typename T>
43  public:
46  virtual PricingEngine* clone() const {
47  return new T(static_cast<const T&>(*this));
48  }
49  };
50 } // namespace julian
51 #endif
File contains template of deep-coping smart pointer.
virtual double prize(const SmartPointer< MarketModel > &, const SmartPointer< Option > &) const =0
prizes option using market model
Class uses Curiously Recurring Template Pattern to implement polymorphic copy construction in every d...
Definition: pricingEngine.hpp:42
Definition: cadHoliday.cpp:3
virtual ~PricingEngine()
destructor
Definition: pricingEngine.hpp:32
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
Interface for all pricing engines.
Definition: pricingEngine.hpp:20
File contains definition of financial option interface.
virtual PricingEngine * clone() const =0
virtual copy constructor
virtual PricingEngine * clone() const
virtual copy constructor
Definition: pricingEngine.hpp:46
File contains implementation of interface for market models.