Calculates option's Vanna. More...

#include <optionVanna.hpp>

Inheritance diagram for julian::OptionVanna:
julian::OptionGreeksDecorator julian::OptionGreeks

Public Member Functions

 OptionVanna (SmartPointer< OptionGreeks > input, double hs, double hv, std::string risk_name="Vanna")
 Constructor. More...
 
std::map< std::string, double > getRisks (const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
 returns the PV and Greek parameter More...
 
GreeksIntermediateResults calculateRisks (const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option)
 calculates the option's Vanna More...
 
OptionVannaclone () const
 Virtual copy constructor. More...
 
- Public Member Functions inherited from julian::OptionGreeksDecorator
 OptionGreeksDecorator (SmartPointer< OptionGreeks > risks)
 Constructor. More...
 
- Public Member Functions inherited from julian::OptionGreeks
virtual ~OptionGreeks ()
 Destructor. More...
 

Private Attributes

double hs_
 Increment used in differencing scheme for spot direction. More...
 
double hv_
 Increment used in differencing scheme for volatility direction. More...
 
std::string risk_name_
 Risk name that will be used as key for result map. Default name is Vanna. More...
 

Detailed Description

Calculates option's Vanna.

This method calculates Vanna. Using the method prize of julian::PricingEngine and bumpVolatility/bumpSpot of julian::MarketModel it calculates the cross-derivative of option prize wrt to spot and volatility.

Vanna of option is calculated using the finite difference scheme

\[Vanna = \frac{\partial^2PV}{\partial Spot \partial Vol} \approx \frac{PV(Spot+h_s,Vol+h_v) - PV(Spot+h_s,Vol-h_v) - PV(Spot-hs,Vol+h_v) + PV(Spot-hs,Vol-hv)}{4h_sh_v}\]

The result is saved in map. OptionVanna is a concrete decorator in decorator structure. Concrete Decorator is a class that altered alters the behaviour of Concrete Component.

Todo:
Implement different schemes for numerical differentiation. At this moment only central differencing is implemented.

Constructor & Destructor Documentation

julian::OptionVanna::OptionVanna ( SmartPointer< OptionGreeks input,
double  hs,
double  hv,
std::string  risk_name = "Vanna" 
)
inline

Constructor.

Member Function Documentation

GreeksIntermediateResults julian::OptionVanna::calculateRisks ( const SmartPointer< MarketModel > &  model,
const SmartPointer< PricingEngine > &  prizer,
const SmartPointer< Option > &  option 
)
virtual

calculates the option's Vanna

Vanna of option is calculated using the finite difference scheme $Vanna = \frac{PV(Spot+h_s,Vol+h_v) - PV(Spot+h_s,Vol-h_v) - PV(Spot-hs,Vol+h_v) + PV(Spot-hs,Vol-hv)}{4h_sh_v}$

Returns
method returns map with key "Vanna" and value of Vanna

Reimplemented from julian::OptionGreeksDecorator.

OptionVanna * julian::OptionVanna::clone ( ) const
virtual

Virtual copy constructor.

Reimplemented from julian::OptionGreeksDecorator.

std::map< std::string, double > julian::OptionVanna::getRisks ( const SmartPointer< MarketModel > &  model,
const SmartPointer< PricingEngine > &  prizer,
const SmartPointer< Option > &  option 
)
virtual

returns the PV and Greek parameter

Returns
method returns map with name of Greeks as key and the value of Greeks as value

Reimplemented from julian::OptionGreeksDecorator.

Member Data Documentation

double julian::OptionVanna::hs_
private

Increment used in differencing scheme for spot direction.

double julian::OptionVanna::hv_
private

Increment used in differencing scheme for volatility direction.

std::string julian::OptionVanna::risk_name_
private

Risk name that will be used as key for result map. Default name is Vanna.


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/pricingEngines/optionGreeks/optionVanna.hpp
  • C:/Unix/home/OEM/jULIAN/src/pricingEngines/optionGreeks/optionVanna.cpp