I am trying to extract the futures contracts that compose commodity indices such as BCOM using the Refinitiv/LSEG Python API.
My goal is to retrieve, for each index component:
- the current futures contract used by the index;
- the next futures contract used for the roll;
- the settlement or close price for both contracts;
I first tried expanding a Chain RIC with:
chain = Chain(name="0#.BCOM")
rics = list(chain.constituents)
but it returned around 2,307 RICs. That is much too large for the actual constituents of BCOM, so I assume I expanded a broad futures chain rather than an official index constituent chain.
What is the recommended way to retrieve the actual futures constituents through LSEG/Refinitiv?
Specifically:
- How can I find the correct Chain RICs in Workspace, RIC Search, Data Item Browser, or through the API?
- Does
Chain(...).constituents return only the current constituents, or can it be used for a historical date such as yesterday? - Once I have the correct RICs, which fields should I use for official daily futures settlement or close prices?
- Is there a field that identifies the current and next roll contracts used by the index, or should this be mapped manually from the BCOM methodology?
Thanks!