I’m using the Refinitiv Data Library for Python to pull daily historical prices for a large universe of global equities (around 20,000 RICs) for some downstream calculations.
dailyFields: ["BID", "ASK", "TR.OpenPrice", "TR.HIGHPRICE", "TR.LOWPRICE", "TRDPRC_1", "TR.Volume"]
My code (simplified) looks like this:
ricsToFetch = [...] # ~20,000 global equity RICs
batchSize = 10
flds = dailyFields
interval = "1D" # daily frequency
startDate = "YYYY-MM-DD"
endDate = "YYYY-MM-DD"
totalBatches = math.ceil(len(ricsToFetch) / batchSize)
for i, ricBatch in enumerate(chunks(ricsToFetch, batchSize)):
batchNum = i + 1
print(f"\n📦 Batch {batchNum}/{totalBatches} ({len(ricBatch)} RICs)...")
print(f" RICs: {', '.join(ricBatch)}")
print(" 🔄 Pulling data from Refinitiv...")
batchData = rd.get_history(
universe=ricBatch,
fields=flds,
interval=interval,
start=startDate,
end=endDate,
)
# Process batchData ...
For most securities this works correctly and I get full daily history.
However, for a non-trivial subset of RICs I am getting only null values (NaN) for all requested fields over the entire date range.
Example RIC: 071280.KQ
- Using the same RIC in Refinitiv Workspace / Eikon, I can see a proper historical price series for the same period.
- Using
rd.get_history in Python, the data frame comes back with rows for the dates, but all of the fields listed above are NaN (or null).
Sharing the snapshot for this ticker
This is just one example; I’m seeing similar behaviour for a number of instruments across my ~20k RIC universe, which makes it difficult to rely on the data without extra checks.
Is there any known reason why rd.get_history would return null values for a RIC that clearly has history in Workspace/Eikon? If so, how do we handle this.