Access time series in Financial Toolbox

조회 수: 1 (최근 30일)
Andrey Vasilyev
Andrey Vasilyev 2015년 8월 6일
답변: Brendan Hamm 2015년 8월 10일
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
Andrey Vasilyev
Andrey Vasilyev 2015년 8월 7일
fints doesnt work properly if there are time series for more than 10 assets.

댓글을 달려면 로그인하십시오.

채택된 답변

Brendan Hamm
Brendan Hamm 2015년 8월 10일
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.

추가 답변 (1개)

Abhishek Pandey
Abhishek Pandey 2015년 8월 10일
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
Andrey Vasilyev
Andrey Vasilyev 2015년 8월 10일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by