Greeks.GreekFillers.VannaGreekFiller

Classes

Dict(...[, two])

Methods

IGreekFiller General interface that retrieves the relevant market states for greek computation, computes the finite difference and fills the greeks dictionary.
MarketStateKey(id) Container class to identify a market state in a greeks run.
MarketStateKeys Static class regrouping the different market state keys used for greeks computation.
ResultKey(id) General container class to identify a computation result.
ResultKeys Static class regrouping the different market state keys used for greeks computation.
VannaGreekFiller(delta_bump_size, vega_bump_size) Class that retrieves the relevant market states for vanna computation, computes the finite difference and fills the greeks dictionary.
class Greeks.GreekFillers.VannaGreekFiller.VannaGreekFiller(delta_bump_size, vega_bump_size)[source]

Class that retrieves the relevant market states for vanna computation, computes the finite difference and fills the greeks dictionary.

Parameters:

delta_bump_size : float

The additive bump \(\epsilon\) applied on the underlying \(S\) for delta computation.

vega_bump_size : float

The additive bump \(\epsilon\) applied on the At-The-Money annualized volatility \(\sigma\) for vega computation.

Methods

fill(...) Retrieve the relevant market states for vanna computation, computes the finite difference and fills the greeks dictionary.
fill(pvs: typing.Dict[Common.MarketStateKey.MarketStateKey, Common.PricingResult.PricingResult], results: typing.Dict[Common.ResultKey.ResultKey, float]) → None[source]

Retrieve the relevant market states for vanna computation, computes the finite difference and fills the greeks dictionary.

Parameters:

pvs : Dict[MarketStateKey, PricingResult]

Dictionary that maps each market state to the option price given that state.

results : Dict[ResultKey, float]

Dictionary that contains the results of greeks computation.

Returns:

None

Examples

>>> from Greeks.GreekFillers.VannaGreekFiller import VannaGreekFiller
>>> from Common.MarketStateKeys import MarketStateKeys
>>> from Common.ResultKeys import ResultKeys
>>> from Common.PricingResult import PricingResult
>>> pvs = dict()
>>> results = dict()
>>> pvs[MarketStateKeys.vanna_delta_up_vega_up] = PricingResult(1.60,0.0,0.0,0.0)
>>> pvs[MarketStateKeys.vanna_delta_up_vega_down] = PricingResult(1.52,0.0,0.0,0.0)
>>> pvs[MarketStateKeys.vanna_delta_down_vega_up] = PricingResult(1.50,0.0,0.0,0.0)
>>> pvs[MarketStateKeys.vanna_delta_down_vega_down] = PricingResult(1.48,0.0,0.0,0.0)
>>> vanna_filler = VannaGreekFiller(delta_bump_size=1.0, vega_bump_size= 0.01)
>>> vanna_filler.fill(pvs, results)
>>> print(results[ResultKeys.vanna])
1.5000000000000013