download historical stock prices from yahoo finance code example Example: import stock data from yahoo finance pip install pandas-datareader