One of the best sources for financial data is the website Quandl. It is used by over 200’000 people in the financial industry.
To download the package simply type the code below into the command window.
pip install quandl
The download of data is as easy as downloading the package. Search for the database and the specific instrument you want to download and fill it into the quandl.get() function. You can find all the datasets on Quandl here.
import quandl data = quandl.get("FRED/GDP") print(data[1:20])
With three simple lines of code, you are now able to download any data from Quandl.
This content is purely informative in nature and does not constitute any offer, inducement, recommendation, or legal or financial advice by the author. In particular, the published information is not to be understood to be an offer of sale of any registered or unregistered securities or an investment proposal of any kind. It is general information provided purely for information purposes and is based on proprietary knowledge, information furnished by third parties, and publicly accessible sources considered reliable by the author.