Greeks.GreekFillers.SmileRiskGreekFiller

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.
SmilerRiskGreekFiller(moneyness, ...) Class that retrieves the relevant market states for smile risk computation, computes the finite difference and fills the greeks dictionary.
class Greeks.GreekFillers.SmileRiskGreekFiller.SmilerRiskGreekFiller(moneyness, smile_risk_bump_size)[source]

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

Parameters:

moneyness : float

The moneyness expressed in delta to identify the shocked implied volatility.

smile_risk_bump_size : float

The additive bump \(\epsilon\) applied on the smile for smile risk computation.

Methods

fill(...) Retrieve the relevant market states for smile risk 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 smile risk 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.SmileRiskGreekFiller import SmilerRiskGreekFiller
>>> from Common.MarketStateKeys import MarketStateKeys
>>> from Common.ResultKeys import ResultKeys
>>> from Common.PricingResult import PricingResult
>>> pvs = dict()
>>> results = dict()
>>> moneyness = 0.95
>>> pvs[MarketStateKeys.smile_risk_up(moneyness)] = PricingResult(1.60,0.0,0.0,0.0)
>>> pvs[MarketStateKeys.smile_risk_down(moneyness)] = PricingResult(1.52,0.0,0.0,0.0)
>>> smile_risk_filler = SmilerRiskGreekFiller(moneyness=moneyness, smile_risk_bump_size=0.01)
>>> smile_risk_filler.fill(pvs, results)
>>> print(results[ResultKeys.smile_risk(moneyness)])
4.0000000000000036