Rank: 5472 based on 1 downloads (last 30 days) and 1 file submitted
photo

Paulo Fonte

E-mail
Company/University
ISEC

Personal Profile:
Professional Interests:
physics

 

Watch this Author's files

 

Files Posted by Paulo
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Jan 2009 Combin2Rank Calculates the rank (sequential ordinal) of nCk combinations Author: Paulo Fonte mathematics 1 0
Comments and Ratings by Paulo View all
Updated File Comments Rating
25 Jun 2011 Download Google Finance Stock Prices Download historical stock prices from Google Finance in a dataset MATLAB format. Author: Fayssal El Moufatich

This snippet will scan the google finance page and generate a csv-like page. Some obvious variables must be predefined. It is limited to 200 days (max in a single google finance page).

url=['http://finance.google.co.uk/finance/historical?q=' codes{n} '&startdate=' MONTHst '+' num2str(Dst) ',+' num2str(Yst) '&enddate=' MONTHend '+' num2str(Dend) ',+' num2str(Yend) '&num=200'];
page=urlread(url);
[tokenDate]=regexp(page,'<td class="lm">(\w{3} \d*, \d*)','tokens');
[tokenOHLC]=regexp(page,'<td class="rgt">(\d*.\d*)','tokens');
[tokenV]=regexp(page,'<td class="rgt rm">([\d,]*)','tokens');
tokenOHLC=reshape(tokenOHLC,4,[]);

newpage=['Date,Open,High,Low,Close,Volume,Adj Close'];
for n=1:length(tokenDate)
    newpage=[newpage char(10), ...
        datestr(datenum(tokenDate{n},'mmm dd, yyyy'),29), ',' ...
        char(regexprep(tokenOHLC{1,n},',','')) ',', ...
        char(regexprep(tokenOHLC{2,n},',','')) ',', ...
        char(regexprep(tokenOHLC{3,n},',','')) ',', ...
        char(regexprep(tokenOHLC{4,n},',','')) ',', ...
        char(regexprep(tokenV{n},',','')) ',0'];
end

24 Jun 2011 Download Google Finance Stock Prices Download historical stock prices from Google Finance in a dataset MATLAB format. Author: Fayssal El Moufatich

Unfortunately, at this time is seems to work only for US and UK stocks.

Top Tags Applied by Paulo
external interface, maple plot import, mathematics
Files Tagged by Paulo View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Jan 2009 Combin2Rank Calculates the rank (sequential ordinal) of nCk combinations Author: Paulo Fonte mathematics 1 0
10 Jul 2006 ReadMaplePlot Imports into Matlab the data that Maple uses for its plots Author: Paulo Fonte external interface, maple plot import 4 4
  • 4.0
4.0 | 3 ratings

Contact us at files@mathworks.com