Based on this post here, I have the possibility to transform the ISIN to some form ticker symbol with help of library investpy. This transformation is correct for most of united states stocks.
But this symbol itself is not in any case the same as the ticker-symbol I need to call pandas_dataframe. I think more exactly it conforms the RIC-symbol (e.g. look here).
For example if I try the following call:
import investpy
df = investpy.stocks.search_stocks(by='isin', value='DE0006048432')
print(df)
My output is:
country name ... currency symbol
0 germany Henkel VZO ... EUR HNKG_p
1 italy Henkel VZO ... EUR HNKG_p
2 switzerland Henkel VZO ... EUR HNKG_pEUR
but
from pandas_datareader import data as pdr
stock = pdr.DataReader('HNKG_p', data_source="yahoo", start="2021-01-01", end="2021-10-30")
gives me an error.
The correct call I need is:
stock = pdr.DataReader('HEN3.DE', data_source="yahoo", start="2021-01-01", end="2021-10-30")
So my question is:
- is there a way to transform an ISIN, maybe WKN or also RIC to the ticker-symbol yahoo needs for DataReader call.
Or more general
- Is there a way to get historical stock data with the knowledge of ISIN, maybe WKN or RIC?