Access time series in Financial Toolbox

1 vue (au cours des 30 derniers jours)
Andrey Vasilyev
Andrey Vasilyev le 6 Août 2015
Hi,
After creating financial time series object using 'fints' function, I have difficulty accessing specific time series:
>>fints_tickData = fints(dates,hist_data,[],'d');
>>fints_tickData.series1
Error using fints/subsref (line 141)
The specified property 'series1' does not exist in the object.
Here is fints_tickData object
>>fints_tickData =
desc: (none)
freq: Daily (1)
Columns 1 through 5
'dates: (261)' 'series 1: (261)' 'series 2: (261)' 'series 3: (261)' 'series 4: (261)'
I'm using:
Financial Toolbox Version 5.5 (R2015a)
  1 commentaire
Andrey Vasilyev
Andrey Vasilyev le 7 Août 2015
fints doesnt work properly if there are time series for more than 10 assets.

Connectez-vous pour commenter.

Réponse acceptée

Brendan Hamm
Brendan Hamm le 10 Août 2015
Hi Andrey. It is not that the series is not created, but rather that all of the datanames have the same length. This means that your data are now referred to as 'series 1','series 2',...,'series10','series11', etc. and not 'series1','series2',...
Since there is a space we have to access this a little different:
num_assets = 12;
num_observ = 22;
data = random('Normal',0,1,num_observ,num_assets);
dates = [today:today+num_observ-1]';
fints_tickData = fints(dates, data, [], 'd');
fints_tickData.(series 1)
Consider using the datanames input to avoid this issue.

Plus de réponses (1)

Abhishek Pandey
Abhishek Pandey le 10 Août 2015
Hi Andrey,
I understand you are having trouble accessing specific time series after creating a financial time series using “fints” function.
I tried to reproduce this issue using dummy data, but it seems to be working for me. I believe there might be an issue with the data. I get the error message that you have provided when I try to display a time series which doesn’t have any entries in it. However, there might be some other reason as well. If possible, share the data that you are using to create the financial time series object.
Here is what I tried using the dummy data:
data = [1:60; 21:80]';
dates = [today:today+59]';
fints_tickData = fints(dates, data, [], 'd');
Accessing “series1” or “series2” displays the respective data.
fints_tickData.series1
fints_tickData.series2
However accessing “series3” displays the same error message to me.
fints_tickData.series3
- Abhishek
  1 commentaire
Andrey Vasilyev
Andrey Vasilyev le 10 Août 2015
Thanks for looking into this.
The problem arises when there are more than 10 time series. In your example there are 2.
Please see if that works:
num_assets = 12;
num_observ = 22;
data = random('Normal',0,1,num_observ,num_assets);
dates = [today:today+num_observ-1]';
fints_tickData = fints(dates, data, [], 'd');
fints_tickData.series1

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by