Hi Team, our client is trying to pull the historical volume and price data in CODEBOOK for Google options using the chain RIC <0#GOOGL*.U>.
Here's the code we initially used:
import lseg.data as ld
from lseg.data.discovery import Chain
ld.open_session()
chain = Chain(name="0#GOOGL*.U")print(chain.constituents)
df = ld.get_history(
universe = chain.constituents[1:],
fields = ['TRDPRC_1','ACVOL_UNS'],
start = '2026-01-01',
end = '2026-06-02',
interval = '1d')
df = df.fillna(0)
df
Somehow, the code only reads the first part / pulls the constituents but not the volume and price data:
Here's the Excel formula:
=@RDP.HistoricalPricing($B$5:$B$1000,"TRDPRC_1;ACVOL_UNS","START:"&$B$2&" END:"&$B$3&" INTERVAL:P1D SOURCE:RFV",,"TSREPEAT:NO NULL:ZERO CH:IN;Fd RH:Timestamp",D4)
We'll appreciate it if you could check and advise.
Thank you very much!
Best Regards,
Yoy