Borrar filtros
Borrar filtros

Time series properties error

12 visualizaciones (últimos 30 días)
mahfoud delal
mahfoud delal el 18 de Jun. de 2019
Respondida: Anurag Ojha el 21 de Ag. de 2024 a las 5:26
I am trying to re do the following tutorial but i don't use datafeed toolbox to get Quandl data. I use the Quandl package directly.
I have the following code and error.
THE CODE:
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;
THE ERROR:
no appropriate property , method or field 'properties' for class 'timeseries'

Respuestas (1)

Anurag Ojha
Anurag Ojha el 21 de Ag. de 2024 a las 5:26
Hey
The error you're encountering occurs because the synchronize function is expecting input tables or timetables, but the Quandl.get function might be returning timeseries objects.
To fix the error, you can convert the timeseries objects to timetable before using the synchronize function.
Adding MATLAB documentations that will help you resolve the error:
Thanks

Categorías

Más información sobre Programming 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