Quandl: Getting End of Day Stock Data with Python

Bernard Brenyah
DS Biz
Published in
3 min readOct 14, 2017

--

An analysis as good as the data allows it to be. It is imperative that Quants get access to highly organized and quality databases. Over the course of this journey, we have only relied on Yahoo! Finance for all stock data needs. This post offers an alternative to Yahoo! Finance; Quandl

Image Credit: https://www.quandl.com/

Before we proceed, I just want to point out that this post is not some “bash Yahoo! Finance as much as you can” type of post. Yahoo! Finance is an amazing resource which has served so many analysts so well over the years. After AOL acquired Yahoo, pandas lost its ability to remotely pull data from Yahoo’s servers. This incident left so many quants scrambling for alternatives as their scripts relied heavily on Yahoo’s data.

Pandas DataReader module has regained access to Yahoo’s data but that ordeal taught a great lesson about not “keeping all my eggs in basket”. When preparing the code for the next post after this, an interesting question popped up in my head “What if Yahoo decommissions Pandas’ access to its API again?

In Quandl, I found a good alternative. This post covers how to pull the end of day stock data from Quandl with our BFF Python. Before proceeding, the quandl python package must be installed. If you don’t have it installed already, simply use this code:

conda install quandl

--

--