Quandl API MATLAB problem

1 visualización (últimos 30 días)
A Basu
A Basu el 4 de Jul. de 2017
Respondida: Nirav Sharda el 13 de Jul. de 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

Respuesta aceptada

Nirav Sharda
Nirav Sharda el 13 de Jul. de 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.

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by