Quandl API MATLAB issues
Show older comments
Hello,
I would greatly appreciate to have some feedback of users of the QUANDL data source linked with MATLAB.
I am trying pull out data from Quandl into Matlab. Quandl do have an API available to be used in Matlab.
so my code is the following :
series = {500 stocks ticker}
series1 = {100 stocks ticker}
if selectedItem == 1 && selectedItem1 == 1 && selectedItem3 == 1 SD = sprintf('%02d-%02d-%04d',SMM,SDD, SYYYY) ED = sprintf('%02d-%02d-%04d',EMM,EDD, EYYYY)
for i = 1:numel(series)
for j = 1:numel(series1)
if strcmp(Tick,series{i}) && strcmp(Tick, series1{j})
Source = strcat('GOOG/NASDAQ_', Tick)
Quandl = Quandl.get(Source, 'trim_start', SD, 'trim_end', ED, 'authcode', 'jtwf2XzCdzxhAKrXxNkm')
end
end
seriesinter = ismember(series,series1);
series(~seriesinter);
seriesnyse = series(~seriesinter);
for h = 1:numel(seriesnyse)
if strcmp(Tick,seriesnyse{h})
Source = strcat('GOOG/NYSE_', Tick)
Quandl = Quandl.get(Source, 'trim_start', SD, 'trim_end', ED, 'authcode', 'jtwf2XzCdzxhAKrXxNkm')
end
end
end
When the ticker is a technological stocks, its entering the first loop, and its connected to Quandl and retrieving the data.
But whenever I call for a non technological stocks, it goes in the second loop, but it just cant retrieve the data, it gives me the following error :
Undefined variable Quandl.
Error in Equities>pushbutton2_Callback (line 919) Quandl = Quandl.get(Source, 'trim_start', SD, 'trim_end', ED, 'authcode', 'jtwf2XzCdzxhAKrXxNkm')
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in Equities (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)Equities('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
which means its recognising the Quandl.get, I dont understand at all why its working in the first loop and not in the second one... When i do a step by step and I put a breakpoint before Quandl in the 2 loop, all the parameters to be used in the API function is good and when I execute it manually in MATLAB it works, but when its in the code, i get this error...
any suggestions?
Thank you very much
Davin.
Accepted Answer
More Answers (1)
Davin
on 1 Oct 2014
0 votes
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!