I sometimes pull the adjusted close price from multiple indices from Yahoo finance without issues. However, tonight when trying to pull the history for the ^FTSE, I got the following error:
KeyError Traceback (most recent call last)
D:\Anaconda3\lib\site-packages\pandas_datareader\yahoo\daily.py in _read_one_data(self, url, params)
156 j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
--> 157 data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
158 except KeyError:
KeyError: 'HistoricalPriceStore'
During handling of the above exception, another exception occurred:
RemoteDataError Traceback (most recent call last)
<ipython-input-9-c01a49bde01f> in <module>
4
5 for t in tickers:
----> 6 ind_data[t] = wb.DataReader(t, data_source='yahoo', start='1997-1-1')['Adj Close']
D:\Anaconda3\lib\site-packages\pandas\util\_decorators.py in wrapper(*args, **kwargs)
186 else:
187 kwargs[new_arg_name] = new_arg_value
--> 188 return func(*args, **kwargs)
189 return wrapper
190 return _deprecate_kwarg
D:\Anaconda3\lib\site-packages\pandas_datareader\data.py in DataReader(name, data_source, start, end, retry_count, pause, session, api_key)
385 retry_count=retry_count,
386 pause=pause,
--> 387 session=session,
388 ).read()
389
D:\Anaconda3\lib\site-packages\pandas_datareader\base.py in read(self)
249 # If a single symbol, (e.g., 'GOOG')
250 if isinstance(self.symbols, (string_types, int)):
--> 251 df = self._read_one_data(self.url, params=self._get_params(self.symbols))
252 # Or multiple symbols, (e.g., ['GOOG', 'AAPL', 'MSFT'])
253 elif isinstance(self.symbols, DataFrame):
D:\Anaconda3\lib\site-packages\pandas_datareader\yahoo\daily.py in _read_one_data(self, url, params)
158 except KeyError:
159 msg = "No data fetched for symbol {} using {}"
--> 160 raise RemoteDataError(msg.format(symbol, self.__class__.__name__))
161
162 # price data
RemoteDataError: No data fetched for symbol ^FTSE using YahooDailyReader
If I remove this indice from the list, everything work and the data appears in the DataFrame.
As far as I know, the FTSE still exist ¯\_(ツ)_/¯
Historical data for FTSE is not available through the website (at least in my geography) and so it isn't available to reader.
Ah, my apologies, it used to be available but I haven't used it in a few years. You're right, they no longer have historical data.
No data fetched for symbol ^STI using YahooDailyReader
I also got the same error while accessing the FTSE for Singaporean Index. The ^STI.
But no worries there's always a way out there
Most helpful comment
Historical data for FTSE is not available through the website (at least in my geography) and so it isn't available to reader.