Time and Dummy Variables

Working with factor models enables the use of time variables (that increase by 1 with each next observation: 1, 2, 3, 4, and so on) and dummy variables (each series observation can have only the value of 0 or 1). Time and dummy variables are ignored in scenarios and do not depend on them. These variables are available in the determinate equation.

If variable's parameter is a date, you can specify a specific date (for example, 01.01.2009) or indicate the date using calendar frequency (annual/quarterly/monthly). Date format:

<Year_number><frequency><frequency_value>

The <frequency> parameter defining the frequency is specified as A for annual frequency, M for monthly frequency and Q for quarterly frequency. The <frequency_value> parameter indicates the number of month or quarter.

For example, 2010M09 corresponds to September 2010, and 2009Q4 to the fourth quarter of 2009.

Time Variables

Time

Syntax:

Time([StartDate: String = "";][CustomFrequency = 0])

The Time variable creates a time series, which value increases by one for each successive observation.

Parameters:

For example:

Time("01.01.2006")

Assume that the sample period start date is 01.01.2003, and the end date is 01.01.2009. The variable will contain the following values:

Year 2003 2004 2005 2006 2007 2008 2009
Value of Time -3 -2 -1 0 1 2 3

Dummy Variables

Seas

Syntax:

Seas(Index: Integer; [CustomFrequency: MsFrequancy = 0])

The Seas variable returns a dummy variable, each element of which indicates whether the observation belongs to the specified period in the current year. The year is divided in accordance with series calendar frequency.

NOTE. The variable is available for all frequencies except for the annual one.

Parameters:

For example:

Seas(4)

Suppose that a model has quarterly frequency, start date of the sample period is 01.01.2003, and end date is 31.12.2004. The variable will contain the following values:

Year I quarter of 2003 II quarter of 2003 III quarter of 2003 IV quarter of 2003
Value of the output variable 0,12 0,13 0,11 0,14
Value of Seas 0 0 0 1
Year I quarter of 2004 II quarter of 2004 III quarter of 2004 IV quarter of 2004
Value of the output variable 0,38 0,47 0,67 0,64
Value of Seas 0 0 0 1

IsPeriod

Syntax:

IsPeriod(StartDate: String; [EndDate: String = "SameDate";][CustomFrequency: MsFrequancy = 0])

The IsPeriod variable returns a dummy variable that determines whether the observation hits the specified period.

Parameters:

The following dummy variables can be implemented within this operator:

See also:

Expression Editor