Download history stock prices automatically from yahoo finance in python

When you’re going to work with such time series in Python, pandas is indispensable. And here’s the good news: it comes with a historical data downloader for Yahoo: pandas.io.data.DataReader. from pandas.io.data import DataReader from datetime import datetime ibm = DataReader(‘IBM’, ‘yahoo’, datetime(2000, 1, 1), datetime(2012, 1, 1)) print(ibm[‘Adj Close’]) Here’s an example from the pandas … Read more