Effacer les filtres
Effacer les filtres

Quandl API MATLAB problem

4 vues (au cours des 30 derniers jours)
A Basu
A Basu le 4 Juil 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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Downloads dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by