Clear Filters
Clear Filters

Quandl API MATLAB problem

4 views (last 30 days)
A Basu
A Basu on 4 Jul 2017
Answered: Nirav Sharda on 13 Jul 2017
Hello, I would appreciate some feedback on how to connect Quandl data source with MATLAB. I am using the Quandl API to fetch the data using the authorization code. I am trying with the following code to read the data and convert it into a financial return series but I am getting error:
"'authcode' is not a recognized parameter. Name-value pair arguments are not accepted for this function".
%Read list of portfolio components
fileID = fopen('portfolio.rtf');
tmp = textscan(fileID, '%s');
fclose(fileID);
pc = tmp{1}; % a list as a cell array
%fetch stock data for last 2 years since:
t0 = 735976; % 12 Jan 2016
date2 = datestr(t0,'yyyy-mm-dd'); % from
date1 = datestr(t0 - 2*365,'yyyy-mm-dd'); % to
% create an empty array for sorting stock data
stockd = {};
for i=1:length(pc) % scan the tickers and fetch the data from Quandl.com
quandlc=['GOOG/NASDAQ_',pc{i}];
fprintf('%4.0f %s\n',i,quandlc);
% fetch the data of the stock from Quandl
fts=0;
fts=Quandl.get(quandlc,'start_date',date1,'end_date',date2,'authcode','T48WwB17eo_qeZAmxyzj');
stockd{i}=fts; % entire FTS object in an array's cell
end

Accepted Answer

Nirav Sharda
Nirav Sharda on 13 Jul 2017
I downloaded the Quandl MATLAB module from the following GitHub link.
If you look at the get.m function in this module, it does not mention 'authcode' as a recognized Name-value pair. If this is the API key, it has 'api_key' as a valid Name-value pair.
I hope this helps.

More Answers (0)

Categories

Find more on Downloads in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!