hi,
I am trying to retrieve historical price data for a list of instruments with python Eikon and datastream. My dynamic list of instruments come from Eikon port
TotalList=(['Portfolio(0867/*Total List*/)'])
dataset, err=ek.get_data(TotalList,['tr.PriceClose'])
rics1 =pd.DataFrame(dataset.loc[:1,'Instrument'])
rics2 = rics1["Instrument"]
rics3 = rics2.tolist()
How do I convert the list of symbols to a list of mnemonics so that I can pass it through to a datastream query?:
ds=dsws.Datastream(username=xxxxxxxxxxxxxx,password='xx')
df=ds.get_data (tickers='mnemonics',
fields=['P'], start='2018-01-01', end='2018-01-10', freq='D')
Many thanks