The IntraDayStockData function can be obtained here. This function takes necessary inputs of a stock symbol and the name of the exchange the stock is traded in. This function also takes optional inputs of quote frequency (in seconds) and number of previous trading days. By default, the optional inputs are set for 1 minute quote intervals and 15 previous trading days. The output of this function are the time, the time in string format, trade volume, highest prices, lowest prices, and closing prices. Here is a quick example for getting the minute by minute quotes of the latest trading day (today) for JP Morgan Chase:
Showing posts with label MATLAB. Show all posts
Showing posts with label MATLAB. Show all posts
Wednesday, July 11, 2012
Historical Minute-by-Minute Stock Prices in MATLAB
This is an extension of my first post on this blog. My first post went over how to gather the minute to minute stock price data from Google Finance using Mathematica. Using the same general programming structure, I've created a function to do this in MATLAB.
jpm = IntraDayStockData('JPM','NYSE','60','1d');
plot(jpm.date,jpm.close,'b-'); hold on;
plot(jpm.date,jpm.high,'r-'); hold on;
plot(jpm.date,jpm.low,'g-');
datetick('x',16);
Subscribe to:
Posts (Atom)
