derivitec.core.client.DerivitecClient.upload_borrow_curves

DerivitecClient.upload_borrow_curves(borrow_rates_by_identifiers=None, market_date=None, use_best_effort=True, upload_zero_rates=False, market_data_environment_name=None, borrow_curves=None)[source]

Upload borrow curves.

Parameters:
  • borrow_rates_by_identifiers (dict[derivitec.misc.types.InstrumentIdentifier, dict[str, float]]) – The borrow curves by identifiers

  • market_date (datetime.datetime) – The market date

  • upload_zero_rates (bool) – The upload zero rates flag (otherwise treats uploaded rates as forward rates)

  • use_best_effort (bool) – The use best effort flag

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

  • borrow_curves (list[derivitec.market_data.types.BorrowCurveData]) – The borrow curve data

Return type:

derivitec.market_data.response.ApiUploadBorrowCurvesResponse

Code

>>> market_data_environment_name = "Example Market Data Environment"
>>> borrow_curves = [BorrowCurveData(asset_name=ric('MSFT.OQ'), value_date=datatime.datetime(2020, 4, 1), maturities=[365, 365*2], rates=[0.05, 0.04], use_zero_rates=False)]
>>> client.upload_borrow_curves(market_data_environment_name=market_data_environment_name, borrow_curves=borrow_curves)