Below are links to various stock market related Matlab scripts.
Please read the disclaimer. The author is not providing professional investing advice. You are responsible for any investment decisions you make using the scripts and I do not guarantee that they are error-free.
A starter Matlab script for building your own market barometer. Retrieves recent price and volume action of the Dow, NASDAQ, and S&P 500 to help you identify high volume buying, selling, or stalling to help predict where the market is headed. See the accompanying article about this here.
A Matlab function that retrieves historical stock data (high, low, open, close, volume) from Yahoo! Finance and also normalizes the raw prices for splits & dividends. See the accompanying article about this here.
The main purpose of this script is just to demonstrate how to use Matlab’s java interface to retrieve any bit of data from a web page. In this case we go and read a P/E statistic from the Yahoo! Finance site. See the accompanying article about this here.
A modified version of the above get_trailing_pe.m to retrieve the forward P/E instead.