File Exchange

image thumbnail

get Intraday Stock Price

version 1.1 (4.17 KB) by

function getHistoricalIntraDayStockPrice obtains intraday stock price from Google.

3 Ratings



View License

function getHistoricalIntraDayStockPrice obtains intraday stock price from Google given the symbol of stock and the name of market which the stock is listed under. The accompanying file demonstrates one method for "cleaning" the data prior analysis.

Comments and Ratings (10)

Interesting discussion! I also wonder if it is possible to get historical option data from Google or Yahoo. I am looking for years of data back?
I found but they only offer stocks and forex.

ted p teng

ted p teng (view profile)

@ Jonathan, you can get the output and then filter by day.
@Jay, the number of outstanding shares can be found here:


Is there a way to use this to get a specific day's data? For example, I want to 1-min bars for GOOG on Feb 18th, 2015.

Jay Cheng

Besides the H L C O of a stock, can you also download the number of outstanding shares?

ted p teng

ted p teng (view profile)

That is a great idea/question Taylor. I have been searching for free intraday forex data too, but I have not found one yet. Please share your implementation with the community if you do figure out how to get those data!

Taylor Xie

Hi,Teng,I want to know how to download the intraday data of Forex exchange data, for example EURUSD. I want to edit your function, but I don't know the url link to get the Forex exchange rate.

ted p teng

ted p teng (view profile)

I have wondered that myself and could not find any documentation for Finviz. Stackoverflow might be a good place to ask this, I did a quick search there, there is not much on Finviz ( )

I'm not sure what kind of data you need, but if it is available on yahoo, you can refer to my other function "get-stock-information-from-yahoo" as a template for downloading data with YQL. Best of luck.


Ryan (view profile)

Another question Ted...Have you been able to find any actual documentation for I have been looking all over for it but can't find anything anywhere. All I have found is a few random posts where people have used queries similar to the one you have used.

ted p teng

ted p teng (view profile)

Thanks Ryan. To my knowledge, there are no publicly accessible historical option data, intraday or daily. But if you do find it, it would be great if you can share it on this file exchange. :)


Ryan (view profile)

Great Work! By chance, do you know if it's possible to download historical intraday option data from google or yahoo?



updated function cleanUSIntradayStockPrice.m
image source:

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video