optionVolga.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_OPTIONVOLGA_HPP
2 #define JULIAN_OPTIONVOLGA_HPP
3 
6 
7 namespace julian {
27  public:
30  OptionVolga(SmartPointer<OptionGreeks> input, double h, NumDiffScheme scheme, std::string risk_name = "Volga"):
31  OptionGreeksDecorator(input), scheme_(scheme), h_(h), risk_name_(risk_name) {}
32  std::map<std::string,double> getRisks(const SmartPointer<MarketModel>& model,
33  const SmartPointer<PricingEngine>& prizer,
34  const SmartPointer<Option>& option);
36  const SmartPointer<PricingEngine>& prizer,
37  const SmartPointer<Option>& option);
38  OptionVolga* clone() const;
39 
41  private:
43  double h_ ;
44  std::string risk_name_;
47  const SmartPointer<MarketModel>& model,
48  const SmartPointer<PricingEngine>& prizer,
49  const SmartPointer<Option>& option);
51  const SmartPointer<MarketModel>& model,
52  const SmartPointer<PricingEngine>& prizer,
53  const SmartPointer<Option>& option);
55  const SmartPointer<MarketModel>& model,
56  const SmartPointer<PricingEngine>& prizer,
57  const SmartPointer<Option>& option);
58  };
59 } // namespace julian
60 
61 #endif
OptionVolga * clone() const
Virtual copy constructor.
Definition: optionVolga.cpp:154
void BwdVolga(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Volga using backward differencing scheme.
Definition: optionVolga.cpp:121
double h_
Increment used in differencing scheme for volatility direction.
Definition: optionVolga.hpp:43
Definition: cadHoliday.cpp:3
std::string risk_name_
Risk name that will be used as key for result map. Default name is Volga.
Definition: optionVolga.hpp:44
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
void CntrVolga(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Volga using central scheme.
Definition: optionVolga.cpp:50
void FwdVolga(GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates Volga using forward differencing scheme.
Definition: optionVolga.cpp:85
NumDiffScheme scheme_
Scheme used in differencing.
Definition: optionVolga.hpp:40
Calculates option&#39;s Volga.
Definition: optionVolga.hpp:26
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: optionVolga.cpp:38
Interface of option Greeks decorating classes.
Data structure holding the PV and Greeks.
Definition: optionGreeks.hpp:23
File contains small mathematical classes and functions.
Interface for classes decorating Option Greeks.
Definition: optionGreeksDecorator.hpp:15
OptionVolga(SmartPointer< OptionGreeks > input, double h, NumDiffScheme scheme, std::string risk_name="Volga")
Constructor.
Definition: optionVolga.hpp:30
GreeksIntermediateResults calculateRisks(const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
Calculates the option&#39;s Volga.
Definition: optionVolga.cpp:12
NumDiffScheme
collection of enumerations, simple classes and small functions used in mathematical computations ...
Definition: mathUtils.hpp:16