I have this code:
ek.get_data("0#.SPX(2017-05-05)", ["TR.CompanyName","TR.PriceClose(2017-05-05)"])
It returns the list the of the s&p500 companies on a given date with their close prices. However, I would like to pass on the dates like this instead:
date='2017-05-05'
ek.get_data("0#.SPX(date)", ["TR.CompanyName","TR.PriceClose(date)"])
But it returns:
HTTPError: 400 Bad Request
Also how can I add the date as a column?
Any suggestion would be much appreciated.