optionGreeksDecorator.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_OPTIONGREEKSDECORATOR_HPP
2 #define JULIAN_OPTIONGREEKSDECORATOR_HPP
3 
5 
6 namespace julian {
16  public:
20 
22  const SmartPointer<PricingEngine>& prizer,
23  const SmartPointer<Option>& option) {
24  return risks_->calculateRisks(model, prizer, option);
25  }
26 
27  virtual std::map<std::string,double> getRisks(const SmartPointer<MarketModel>& model,
28  const SmartPointer<PricingEngine>& prizer,
29  const SmartPointer<Option>& option) {
30  auto ret = risks_->calculateRisks(model, prizer, option);
31  return ret.PV_and_Greeks_;
32  }
33 
35  return new OptionGreeksDecorator(*this);
36  }
37 
38  virtual ~OptionGreeksDecorator(){};
39  private:
41  };
42 }
43 
44 #endif /* JULIAN_OPTIONGREEKSDECORATOR_HPP */
OptionGreeksDecorator * clone() const
Virtual copy constructor.
Definition: optionGreeksDecorator.hpp:34
Definition: cadHoliday.cpp:3
OptionGreeksDecorator(SmartPointer< OptionGreeks > risks)
Constructor.
Definition: optionGreeksDecorator.hpp:19
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
SmartPointer< OptionGreeks > risks_
Pointer to decorator interface.
Definition: optionGreeksDecorator.hpp:38
Interface of option&#39;s Greeks structure.
Data structure holding the PV and Greeks.
Definition: optionGreeks.hpp:23
virtual std::map< std::string, double > getRisks(const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
returns the PV and Greek parameter
Definition: optionGreeksDecorator.hpp:27
Interface for OptionGreeks decorator.
Definition: optionGreeks.hpp:32
Interface for classes decorating Option Greeks.
Definition: optionGreeksDecorator.hpp:15
virtual GreeksIntermediateResults calculateRisks(const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
calculates the PV or Greek parameter
Definition: optionGreeksDecorator.hpp:21