derivitec.core.client.DerivitecClient.get_equity_vol_grid

DerivitecClient.get_equity_vol_grid(vol_surface, maturities, strikes, strike_type, market_data_environment_name=None)[source]

Get equity vol grid from a vol surface

Parameters:
  • vol_surface (derivitec.market_data.EquityVolSurface) – The vol surface

  • maturities (list of int) – The maturities

  • strikes (list of list) – The strikes in the format of strike_type.

  • strike_type (derivitec.market_data.VolGrid.StrikeType) – The strike type

  • market_data_environment_name (str) – The market data environment name (optional with default Organisation Level Environment)

Return type:

derivitec.market_data.response.ApiGetEquityVolGridResponse

Code

>>> import datetime
>>> vol_surface = EquityVolSurface(
...     asset_name=ric("MSFT.OQ"),
...     reference_date=datetime.datetime(2017, 10, 13),
...     benchmark_maturities=[365, 365 * 5],
...     benchmark_fwd_factors=[1.0, 1.0],
...     vols=[0.5, 0.7],
...     smiles=[0.0, 0.0],
...     skews=[0.0, 0.0],
...     call_wings=[0.0, 0.0],
...     put_wings=[0.0, 0.0],
...     strike_type=VolatilitySurfaceSvi.StrikeType.Logarithmic,
...     spot_ref=100)
>>> maturities = [365, 365 * 3]
>>> strikes = [[1.0], [0.5, 1.2]]
>>> strike_type = VolGrid.StrikeType.PercentSpot
>>> market_data_environment_name = "Example Market Data Environment"
>>> response = client.get_equity_vol_grid(vol_surface, maturities, strikes, strike_type, market_data_environment_name)