vertcat
Concatenate financial time series objects vertically
vertcat
is not recommended. Use timetable
instead. For more information, see Convert Financial Time Series Objects fints to Timetables.
Syntax
vertcat
Description
vertcat
implements vertical concatenation of financial time series
objects. vertcat
essentially adds data points to a time series
object. Objects to be vertically concatenated must not have any duplicate dates and/or
times or any overlapping dates and/or times. The description fields are concatenated as
well. They are separated by ||
.
Examples
Create two financial time series objects with daily frequencies:
myfts = fints((today:today+4)', (1:5)', 'DataSeries', 'd') yourfts = fints((today+5:today+9)', (11:15)', 'DataSeries', 'd')
Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints (line 165) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/display (line 66) myfts = desc: (none) freq: Daily (1) 'dates: (5)' 'DataSeries: (5)' '02-Oct-2017' [ 1] '03-Oct-2017' [ 2] '04-Oct-2017' [ 3] '05-Oct-2017' [ 4] '06-Oct-2017' [ 5] Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints (line 165) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/display (line 66) yourfts = desc: (none) freq: Daily (1) 'dates: (5)' 'DataSeries: (5)' '07-Oct-2017' [ 11] '08-Oct-2017' [ 12] '09-Oct-2017' [ 13] '10-Oct-2017' [ 14] '11-Oct-2017' [ 15]
Use vertcat
to concatenate them vertically:
newfts1 = [myfts; yourfts]
Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/vertcat (line 35) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/display (line 66) newfts1 = desc: || freq: Daily (1) 'dates: (10)' 'DataSeries: (10)' '11-Dec-2001' [ 1] '12-Dec-2001' [ 2] '13-Dec-2001' [ 3] '14-Dec-2001' [ 4] '15-Dec-2001' [ 5] '16-Dec-2001' [ 11] '17-Dec-2001' [ 12] '18-Dec-2001' [ 13] '19-Dec-2001' [ 14] '20-Dec-2001' [ 15]
Create two financial time series objects with different frequencies:
myfts = fints((today:today+4)', (1:5)', 'DataSeries', 'd'); hisfts = fints((today+5:7:today+34)', (11:15)', 'DataSeries',... 'w')
Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints (line 165) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints (line 165) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/display (line 66) hisfts = desc: (none) freq: Weekly (2) 'dates: (5)' 'DataSeries: (5)' '07-Oct-2017' [ 11] '14-Oct-2017' [ 12] '21-Oct-2017' [ 13] '28-Oct-2017' [ 14] '04-Nov-2017' [ 15]
Concatenate these two objects vertically:
newfts2 = [myfts; hisfts]
Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/vertcat (line 35) Warning: FINTS will be removed in a future release. Use TIMETABLE instead. > In fints/display (line 66) newfts2 = desc: || freq: Unknown (0) 'dates: (10)' 'DataSeries: (10)' '11-Dec-2001' [ 1] '12-Dec-2001' [ 2] '13-Dec-2001' [ 3] '14-Dec-2001' [ 4] '15-Dec-2001' [ 5] '16-Dec-2001' [ 11] '23-Dec-2001' [ 12] '30-Dec-2001' [ 13] '06-Jan-2002' [ 14] '13-Jan-2002' [ 15]
If all frequency indicators are the same, the new object has the same frequency
indicator. However, if one of the concatenated objects has a different
freq
from the other(s), the frequency of the resulting object is
set to Unknown (0)
. In these examples, newfts1
has
Daily
frequency, while newfts2
has
Unknown (0)
frequency.