File Exchange

image thumbnail

Download Yahoo Finance Data For Trading and Backtesting

version 1.1 (1.88 KB) by

The script downloads 10 years of stock data from Yahoo Finance.



View License

Downloads 10 years worth of daily stock data from yahoo finance. The open, high, low prices are adjusted based on the adjClose field.
The output is saved in csv format in the directory specified by the DIRECTORY parameter.

Download the data of 5 technology stocks and save the result in the C:\StockData directory:

getyahoo10('AAPL,AMZN,GOOG,IBM,SAP', 'C:\StockData');

Comments and Ratings (3)

gaurang Vakil

had issue with the IP address - The IP address of "" could not be determined. is it region locked or for specific market (i assume)?


Arty (view profile)

works great


hjy009 (view profile)



Fixed Windows line breaks for downloaded data.

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today