필터 지우기
필터 지우기

Quandl API MATLAB problem

조회 수: 4 (최근 30일)
A Basu
A Basu 2017년 7월 4일
답변: Nirav Sharda 2017년 7월 13일
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에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by