Access time series in Financial Toolbox

1 view (last 30 days)
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 Comment
Andrey Vasilyev
Andrey Vasilyev on 7 Aug 2015
fints doesnt work properly if there are time series for more than 10 assets.

Sign in to comment.

Accepted Answer

Brendan Hamm
Brendan Hamm on 10 Aug 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.

More Answers (1)

Abhishek Pandey
Abhishek Pandey on 10 Aug 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 Comment
Andrey Vasilyev
Andrey Vasilyev on 10 Aug 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

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!