IRIS Toolbox Reference Manual

trec

Create new recursive time subscript object

Syntax

T = trec(Dates)

Input arguments

Output arguments

Description

Time-recursive subscript objects are used to reference tseries objects on both the left-hand side and the right-hand side of a time-recursive assignment. The assignment is then evaluated for each date in Dates, from the first to the last.

See more on time-recursive expressions in Contents, including the description of instances in which IRIS fails to evaluate the time-recursive expressions correctly.

Example

Construct a first-order autoregressive process with normally distributed residuals:

T = trec(qq(2010,1):qq(2020,4));
x = tseries(qq(2009,4),10);
e = tseries(qq(2010,1):qq(2020,4),@randn);
x(T) = 10 + 0.8*x(T-1) + e(T);