Parallel Computing Toolbox To Speed Up Multiple Webread Calls
Show older comments
Hello All,
I am wondering if any of you have experience using the parallel computing toolbox, specifically with webread. I am currently working on a program to download, and process google finance data. Everything is going great, however the download time for aournd 300 stock stymbols is rather long. I am interested in speeding this up, and thought webread might be a good option. For example, here is a simplified version of the code I am looking to speed up.
%General set of tickers, usually 250+ in length
tickers={'AAIO','AAPL','FB','GOOGL','NVDA','TWTR'}
Length='10';
Freq='60';
for ii = 1:length(tickers)
wop=weboptions('Timeout',15);
temp=webread(strcat('https://www.google.com/finance/getprices?i=',Freq,'&p=',Length,...
'd&f=d,o,h,l,c,v&df=cpct&q=',tickers{ii},'&ignore=.csv'),wop);
data = textscan(temp, '%s%f%f%f%f%f%f', 'delimiter', ',', ...
'Headerlines', 7);
min=str2double(data{1});
min(isnan(min))=0;
op=data{2};
high=data{3};
low=data{4};
cl=data{5};
vol=data{6};
stocks(ii).ticker=tickers{ii};
stocks(ii).min=min;
stocks(ii).op=op;
stocks(ii).high=high;
stocks(ii).low=low;
stocks(ii).cl=cl;
stocks(ii).vol=vol;
end
To clarify, I do not currently own the parallel computing toolbox, I am just wondering if it may help my particular situation.
Accepted Answer
More Answers (0)
Categories
Find more on Google in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!