derivitec.core.client.DerivitecClient.upload_fx_vol_grids

DerivitecClient.upload_fx_vol_grids(fx_vol_grids, use_best_effort, market_data_environment_name=None)[source]

Upload fx vol grids.

Parameters:
  • fx_vol_grids (list of FxVolGrids) – The fx vol grids

  • use_best_effort (bool) – The best effort flag

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

Code

>>> fx_pair = "USD/GBP"
>>> reference_date = datetime(2017, 10, 13)
>>> tenors = ["ON", "3M"] 
>>> deltas = [["10P", "15P", "20P", "25P", "30P", "35P", "40P", "45P", "ATM", "45C", "40C", "35C", "30C", "25C", "20C", "15C", "10C"], 
...           ["10P", "15P", "20P", "25P", "30P", "35P", "40P", "45P", "ATM", "45C", "40C", "35C", "30C", "25C", "20C", "15C", "10C"]]            
>>> vols = [[0.096, 0.094, 0.092, 0.09, 0.088, 0.086, 0.084, 0.082, 0.081, 0.0815, 0.083, 0.083, 0.0845, 0.086, 0.0875, 0.089, 0.0905], 
...         [0.097, 0.095, 0.093, 0.091, 0.089, 0.087, 0.085, 0.083, 0.082, 0.0825, 0.084, 0.084, 0.0855, 0.087, 0.0885, 0.09, 0.0915]]
>>> fx_vol_grid = FxVolGrid(
...     fx_pair = fx_pair,
...     reference_date = reference_date,
...     tenors = tenors,
...     deltas = deltas,   
...     vols = vols)
>>> fx_vol_grids = [fx_vol_grid]
>>> use_best_effort = True
>>> market_data_environment_name = "Example Market Data Environment"
>>> client.upload_fx_vol_grids(fx_vol_grids, use_best_effort, market_data_environment_name)