derivitec.core.client.DerivitecClient.get_forward¶
- DerivitecClient.get_forward(underlyer, expiries)[source]¶
Get forward of an asset at a set of expiries.
- Parameters:
underlyer (
derivitec.market_data.types.Asset) – The underlyer.expiries (list of datetime.datetime) – The expiries.
- Return type:
Code
First get any asset, say, a commodity as in the get_commodities example.
>>> commodity_id = CommodityId(Name="Aluminium", Exchange="LME") >>> commodities = client.get_commodities([commodity_id], {commodity_id : CommodityDescriptor()}, [datetime(2017, 8, 14)]) >>> commodity = commodities[0]
Then use this to call get_forward.
>>> client.get_forward(commodity, [datetime(2017, 9, 14)] )