hist_stock_data(sta​rt_date, end_date, varargin)

Used to retrieve historical stock data for a user-specified date range

Download
Download

You are now following this Submission

Cite As

Josiah Renfree (2026). hist_stock_data(start_date, end_date, varargin) (https://au.mathworks.com/matlabcentral/fileexchange/18458-hist_stock_data-start_date-end_date-varargin), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.7.0

Fixes error resulting from update to Yahoo Finance service

Download
1.6.0

- Volume and Adjusted Close values were swapped
- Now allows for passing ticker symbols into function as a cell array of ticker symbol strings
- Date inputs can now be expressed as Matlab datenums

Download
1.5.0

Changed date calculations to avoid using the posixtime function, since that is a relatively new function that some people might not have. Instead, it now calculates the posix time using Matlab datenums and converting to seconds.

Download
1.4.0

Now allows for downloading of historical dividend data

Download
1.3.0

Fixed error obtaining data from Yahoo Finance. Yahoo changed their service which now requires an account to access the data.

Download
1.2.0

Updated program description to notify users that it currently doesn't work

Download
1.1.0

Minor updates:
1. Changed textread comand to use textscan, as textread may eventually be removed.
2. Changed how results are put into the data structure by using the deal command.

Download
1.0.0

Some users are experiencing problems with the urlread command, which I believe occurs because the program is accessing the ticker symbols as cell arrays not as strings. Changed command 'tickers(i)' to 'tickers{i}' in urlread command.

Download