derivitec.core.client.DerivitecClient.futures_price¶
- DerivitecClient.futures_price(contracts, reporting_currency, pricing_date=None, mkt_data_date=None, mkt_data=None)[source]¶
Get the futures price of contracts for a market data date and pricing date or for some predefined market data.
- Parameters:
contracts (list of Contract) – The contracts.
reporting_currency (str) – The reporting currency.
pricing_date (datetime) – The pricing date. (optional, provided mkt_data supplied)
mkt_data_date (datetime) – The market data date. (optional, provided mkt_data supplied)
mkt_data (MktDataContainer (optional, provided pricing_date and mkt_data_date supplied)) – The market date
- Return type:
Code
Either supply a pricing date with a market data date or supply the market data container.
>>> contracts = [BondFutureByCode(code=ric("FVZ7"))] >>> reporting_currency = "USD" >>> mkt_data_date = datetime(2017, 11, 1) >>> pricing_date = datetime(2017, 11, 1) >>> client.get_futures_price(contracts, reporting_currency, ... mkt_data_date=mkt_data_date, pricing_date=pricing_date)