You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Example:
Download the data of 5 technology stocks and save the result in the C:\StockData directory:
getyahoo10('AAPL,AMZN,GOOG,IBM,SAP', 'C:\StockData');
Cite As
tadeveloper (2026). Download Yahoo Finance Data For Trading and Backtesting (https://www.mathworks.com/matlabcentral/fileexchange/39858-download-yahoo-finance-data-for-trading-and-backtesting), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Mean Variance Portfolio Optimization of S&P 500 Stocks, Yahoo! Finance Data Loader
General Information
- Version 1.1.0.0 (1.88 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
