download stock index price by a list of RICs
Hi! I am trying to download daily price of stock index from a list of RICs by the following code. But it does not work. Can you please help me on this?
df, e = ek.get_data(["MERV","SP500","ATX"],
['TR.PriceClose(Curn=USD)','TR.PriceClose.calcdate'],
{'SDate': '2012-01-01',
'EDate': '2023-02-10','Frq':'D'})
df
Find more posts tagged with
Sort by:
1 - 1 of
11
Sort by:
1 - 1 of
11
Thank you for reaching out to us.
Typically, the index RICs are prefixed with the "." character.
The code looks like this:
df, e = ek.get_data([".MERV",".SP500",".ATX"],
['TR.PriceClose(Curn=USD)','TR.PriceClose.calcdate'],
{'SDate': '2012-01-01',
'EDate': '2023-02-10','Frq':'D'})
df
@jiayin.meng.20
Thank you for reaching out to us.
Typically, the index RICs are prefixed with the "." character.
The code looks like this: