Skip to content
Advertisement

Python: pandas_datareader import historical stock data in euro

My aim is to get historical stock datas of different stocks from europe and us. With the function:

JavaScript

Output:

JavaScript

returns the historical stock data in USD.

Otherwise

JavaScript

Output:

JavaScript

return the historical stock data in EUR.

Is there a possibility to unify the currency in both cases?

Advertisement

Answer

Download EURUSD%3DX to convert your data from EUR to USD. The important part is to reindex correctly your dataframes to align dates between them.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement