Hello,
I'm currently utilizing Python as my programming language with Refinitiv Workspace as the API. My objective is to construct a for loop to gather ETF tickers (approximately 500 ETFs) in Python, subsequently converting them into daily returns, and finally plotting these returns into an Excel file. However, I've encountered an issue while attempting to retrieve these ETFs from Python. I've created a list of ETFs using `rd.get_history` (provided below), yet I consistently encounter the following error message:
Error processing 2023-01-03 00:00:00: Error code -1 | The '2' is unexpected in formula. Only the whole lexeme could be quoted. Escape sequence for quote, apostrophe and right brace is doubling. Requested universes: ["List('2023-01-03 00:00:00')"]. Requested fields: ['TR.CLOSEPRICE(CURN=USD)']
Is there a convenient function available for retrieving numerous ETFs from Refinitiv, perhaps in the form of a list that I could utilize within a for loop?
Thank you,
australian_etfs = df = rd.get_history(
universe=["List('AUS_ETF_Trial')"],
fields=["TR.ClosePrice(Curn=USD)"],
start="2022-12-31",
end="2023-12-31"