julian::GreeksIntermediateResults Struct Reference

Data structure holding the PV and Greeks. More...

#include <optionGreeks.hpp>

Public Attributes

std::map< std::tuple< double, double >, double > intermediate_results_
 std::map with PVs calculated with different spot and vol shifts More...
 
std::map< std::string, double > PV_and_Greeks_
 std::map with name of Greeks as key and the value of Greeks as value; More...
 

Detailed Description

Data structure holding the PV and Greeks.

The structure contains two std::maps:

  • one with name of Greeks as key and the value of Greeks as value;
  • one with PVs calculated with different spot and vol shifts. To calculate Greeks using finite difference method we need to calculate PVs after shifting Spot or Vol values. Some Greeks,like Delta and Gamma, may be using the same shifted values. To avoid multiple calculations of the same values, the intermediates results are saved for later use. The intermediate results are saved in std::map, with key represented by tuple containing two doubles: spot shift and volatility shift, and value of PV calculated using these shifts.

Member Data Documentation

std::map<std::tuple<double,double>, double> julian::GreeksIntermediateResults::intermediate_results_

std::map with PVs calculated with different spot and vol shifts

std::map<std::string,double> julian::GreeksIntermediateResults::PV_and_Greeks_

std::map with name of Greeks as key and the value of Greeks as value;


The documentation for this struct was generated from the following file: