I am trying to get financial data on bonds and funds not traded in the US.
This is my code:
import pandas.io.data as web
from datetime import datetime
end = datetime.now()
start = datetime(end.year - 5, end.month, end.day)
df = web.DataReader("U1IL.DU", 'yahoo', start, end)
But I always get the following error:
File "/usr/lib/pymodules/python2.7/pandas/io/data.py", line 177, in _retry_read_url
rs.index.name = rs.index.name.decode('unicode_escape').encode('ascii', 'ignore')
UnboundLocalError: local variable 'rs' referenced before assignment
It seems that the "."
part confuses the program.
Is there a way to enter alternatively
- WKN (German securities identification code) or
- ISIN (International Securities Identification Number)
instead of the 4-letter based ticker symbol?