File Exchange

image thumbnail

Download historical financial data from Yahoo!

version 1.3.0.0 (4.25 KB) by Aitor Roca
Retrieve historical stock data from Yahoo! Finance

12 Downloads

Updated 28 Jan 2018

View License

Retrieves historical stock data for the ticker symbols in Asset cell array (ticker symbol and yahoo stock exchange symbol), between the dates specified by Date1 (beginning) and Date2 (end) in the Matlab datenums format. The program returns the stock data in xls at '/Data' folder, giving the Date, Open, High, Low, Close, Volume, and Adjusted Close price adjusted for dividends and splits.

For PERSONAL, INFORMATIONAL use ONLY.

-------------------------------------------------------------------------------------------------------------------------------------

Example:

Asset = {
'AAPL','';
'ANA','MC';
'BKIA','MC';
'CDR','MC';
'ENG','MC';
'GLD','';
'IAG','MC';
'LYXIB','MC';
'MT','AS';
'OHL','MC';
'ITX','MC';
'SAN','MC';
'TEF','MC'
};
Asset = table(Asset(:,1), Asset(:,2), 'VariableNames', {'Symbol', 'SE'});
Date1 = '26-Jan-2017';
Date2 = '27-Jan-2018';
interval = '1d';

downloadStocksData(Asset,Date1,Date2,interval)

Comments and Ratings (5)

Nardin

Good quality code, thanks

p l

it still doesn't work.
can u adjust it.
i get a connection error with the example data.
what am i doing wrong ?
btw : great idea :3

does not work with the example :/

Updates

1.3.0.0

Bugs fixed.

1.2.0.0

Now creates 'Data' folder and then add to the path

1.1.0.0

Now checks if data is numeric.

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Yahoo! Finance Data Loader