When we download financial data using python, how can we specify the frequency of time such as day, month or year? How can we specify the currency such as Japanese Yen and US dollars
@saku
Thank you for reaching out to us.
You can use the LSEG Data Library for Python to get financial data through the Workspace application.
The examples are available GitHub. You can refer to the get_data and get_history examples.
You can use the Data Item Browser tool to search for fields and parameters. Some fields support the currency parameter.
Otherwise, you can contact the Helpdesk support team, which can be reached by submitting queries through LSEG Support. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.
You need to ask for the Excel formula, such as =RDP.Data and =RDP.HistoricalPricing, that can be used to retrieve the required data. Then, we can help you converting that formula to Python code.
Please include the URL of this discussion in your raised question to prevent it from being redirected back to this Q&A forum.
Thank you very much for your kind reply.
I still can not figure out how to do. When I download the financial data using get_data by specifying SDate=2015/1/1 and EDate=2023/12/31, the data does not include the date information. So I am not sure which number corresponds to the financial data of when.
In GetData example, how can we know Canadian dollar should be specified as ‘CAD’? How to specify Japanese Yen?
Ing GetData example, can we specify the frequency of time as year or month or day? How can we let the output data include ‘time’ as well?
Are there lists of codes to specify time (Year, Month, Day) and currency (Euro, US dollars, Japanese Yen)?
Thank you so much.