Quandl API MATLAB problem

2 次查看(过去 30 天)
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

采纳的回答

Nirav Sharda
Nirav Sharda 2017-7-13
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by