Calculates option's delta. More...
#include <optionDelta.hpp>

Public Member Functions | |
OptionDelta (SmartPointer< OptionGreeks > input, double h, NumDiffScheme scheme, std::string risk_name="Delta") | |
Constructor. More... | |
GreeksIntermediateResults | calculateRisks (const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option) |
Calculates the option's delta. 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... | |
OptionDelta * | clone () const |
Virtual copy constructor. More... | |
![]() | |
OptionGreeksDecorator (SmartPointer< OptionGreeks > risks) | |
Constructor. More... | |
OptionGreeksDecorator * | clone () const |
Virtual copy constructor. More... | |
![]() | |
virtual | ~OptionGreeks () |
Destructor. More... | |
Private Member Functions | |
void | CntrDelta (GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option) |
Calculates delta using central differencing scheme. More... | |
void | FwdDelta (GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option) |
Calculates delta using forward differencing scheme. More... | |
void | BwdDelta (GreeksIntermediateResults &rr, const SmartPointer< MarketModel > &model, const SmartPointer< PricingEngine > &prizer, const SmartPointer< Option > &option) |
Calculates delta using backward differencing scheme. More... | |
Private Attributes | |
double | h_ |
Increment used in differencing scheme. More... | |
NumDiffScheme | scheme_ |
Scheme used in differencing. More... | |
std::string | risk_name_ |
Risk name that will be used as key for result map. Default name is Delta. More... | |
Detailed Description
Calculates option's delta.
This method calculates Delta. Using the method prize of julian::PricingEngine and bumpSpot of julian::MarketModel it calculates the option sensitivity to asset prize change. Delta of option is calculated using following finite difference scheme:
when forward differencing is used
when backward differencing is used
when central differencing is used The result is saved in map. OptionDelta is a concrete decorator in decorator structure. Concrete Decorator is a class that altered alters the behaviour of Concrete Component.
Constructor & Destructor Documentation
|
inline |
Constructor.
Member Function Documentation
|
private |
Calculates delta using backward differencing scheme.
Method checks if the PV for a given market shifts were calculated. If yes, it uses them in estimating the Delta. If they were not calculated, it performs calculations, saves them and then calculates Delta.
|
virtual |
Calculates the option's delta.
Delta of option is calculated using the finite difference scheme
when forward differencing is used
when backward differencing is used
when central differencing is used
Reimplemented from julian::OptionGreeksDecorator.
|
virtual |
Virtual copy constructor.
Reimplemented from julian::OptionGreeks.
|
private |
Calculates delta using central differencing scheme.
Method checks if the PV for a given market shifts were calculated. If yes, it uses them in estimating the Delta. If they were not calculated, it performs calculations, saves them and then calculates Delta.
|
private |
Calculates delta using forward differencing scheme.
Method checks if the PV for a given market shifts were calculated. If yes, it uses them in estimating the Delta. If they were not calculated, it performs calculations, saves them and then calculates Delta.
|
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
|
private |
Increment used in differencing scheme.
|
private |
Risk name that will be used as key for result map. Default name is Delta.
|
private |
Scheme used in differencing.
The documentation for this class was generated from the following files:
- C:/Unix/home/OEM/jULIAN/src/pricingEngines/optionGreeks/optionDelta.hpp
- C:/Unix/home/OEM/jULIAN/src/pricingEngines/optionGreeks/optionDelta.cpp