pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.
https://pydata.github.io/pandas-datareader/stable/index.html
Other
2.9k stars 681 forks source link

Any idea to download the historical gold data(daily)? #842

Closed impvd closed 3 years ago

impvd commented 3 years ago

Hi all,

After doing some research, I found there're several ways to download today's gold price, such as:

However, it seems that it's hard to download the historical gold data, like, from 1970.

I was wondering if anyone have some hints on this?

ghost commented 3 years ago

FRED provides daily gold price from 1968-04-01 to today. Please see here.

An example code to fetch it is as follows.

import pandas_datareader

pandas_datareader.DataReader("GOLDAMGBD228NLBM", data_source="fred", start="19000101")
matsuobasho commented 1 year ago

This solution no longer works. I get the following error: No data found for this date range, symbol may be delisted

It appears FRED delisted Gold prices in Jan 2022: https://news.research.stlouisfed.org/2022/01/ice-benchmark-administration-ltd-iba-data-to-be-removed-from-fred/