时间序列没有“属性”-提取Quandl数据时出错

时间:2019-06-18 05:53:44

标签: matlab time-series quandl

我正在尝试复制The MathWorks的this MATLAB tutorial

但是我在第一步中无法从Quandl获取市场数据。我没有使用Datafeed工具箱(如本教程所述),而是直接使用了Quandl软件包,该软件包是免费的。

错误在代码的最后一行。

我的代码:

Connect to Quandl
Load credential and connect to Quandl

c = Quandl.api_key('xxxxxxxxxxxxxxx'); % You need to enter your Quandl key here
%c = quandl(quandlKey);
clearvars quandlKey

Set symbols for retrieving data
symbol1 = {'BCHAIN/MKPRU', ...% Bitcoin Market Price USD
'BCHAIN/MWNUS', ...% Bitcoin My Wallet Number of Users
'BCHAIN/DIFF',  ...% Bitcoin Difficulty};   % Total Bitcoins

 Retrieve data from Quandl in the past 2,000 days
 nDays = 2000;
 d = cell(1,numel(symbol1));
 d{1} = Quandl.get(symbol1{1}, today - nDays,today - 1);
 T = d{1};
 for i = 2:numel(symbol1)
      d{i} = Quandl.get(symbol1{i}, today - nDays,today - 1);
      T = synchronize(T,d{i});
 end

Create new variable names
symbol2 = regexprep(symbol1,'BCHAIN/',''); % Tighten symbols' name
T.Properties.VariableNames = symbol2;

错误:

  

对于“时间序列”类没有适当的属性,方法或字段“属性”。

0 个答案:

没有答案