optionVega.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_OPTIONVEGA_HPP
2 #define JULIAN_OPTIONVEGA_HPP
3 
6 
7 namespace julian {
26  public:
29  OptionVega(SmartPointer<OptionGreeks> input,double h, NumDiffScheme scheme, std::string risk_name = "Vega"):
30  OptionGreeksDecorator(input), h_(h), scheme_(scheme), risk_name_(risk_name) {}
31 
33  const SmartPointer<PricingEngine>& prizer,
34  const SmartPointer<Option>& option);
35 
36  std::map<std::string,double> getRisks(const SmartPointer<MarketModel>& model,
37  const SmartPointer<PricingEngine>& prizer,
38  const SmartPointer<Option>& option);
39  OptionVega* clone() const;
40 
41  ~OptionVega(){};
42  private:
43  double h_ ;
45  std::string risk_name_;
48  const SmartPointer<MarketModel>& model,
49  const SmartPointer<PricingEngine>& prizer,
50  const SmartPointer<Option>& option);
52  const SmartPointer<MarketModel>& model,
53  const SmartPointer<PricingEngine>& prizer,
54  const SmartPointer<Option>& option);
56  const SmartPointer<MarketModel>& model,
57  const SmartPointer<PricingEngine>& prizer,
58  const SmartPointer<Option>& option);
59  };
60 }
61 #endif
void CntrVega(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Vega using central differencing scheme.
Definition: optionVega.cpp:40
Definition: cadHoliday.cpp:3
double h_
Increment used in differencing scheme.
Definition: optionVega.hpp:41
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
void BwdVega(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Vega using backward differencing scheme.
Definition: optionVega.cpp:98
GreeksIntermediateResults calculateRisks(const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
calculates the option&#39;s Vega
Definition: optionVega.cpp:14
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: optionVega.cpp:123
OptionVega * clone() const
virtual copy constructor
Definition: optionVega.cpp:131
Interface of option Greeks decorating classes.
Data structure holding the PV and Greeks.
Definition: optionGreeks.hpp:23
NumDiffScheme scheme_
Scheme used in differencing.
Definition: optionVega.hpp:44
File contains small mathematical classes and functions.
Calculates option&#39;s vega.
Definition: optionVega.hpp:25
OptionVega(SmartPointer< OptionGreeks > input, double h, NumDiffScheme scheme, std::string risk_name="Vega")
Constructor.
Definition: optionVega.hpp:29
Interface for classes decorating Option Greeks.
Definition: optionGreeksDecorator.hpp:15
NumDiffScheme
collection of enumerations, simple classes and small functions used in mathematical computations ...
Definition: mathUtils.hpp:16
void FwdVega(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Vega using forward differencing scheme.
Definition: optionVega.cpp:71
std::string risk_name_
Risk name that will be used as key for result map. Default name is Vega.
Definition: optionVega.hpp:45