This example will use Win Genhol to create a user-defined regressor for Easter from 1990 to 2015. This file will have values very close to those of the default regressor generated by X-13ARIMA-SEATS for Easter with a window length of 8 (easter[8]).
First set the options for the global spec including the name of output files to be saved, the first and last years of the regressor, the period, the number of holidays and the type of the regressor. Many of these options are the default values supplied by Win Genhol.
Next set the options for the holiday spec including the holiday dates file, the type of centering (calendar), and the holiday effect window (8 days before the holiday to 1 day before).
Win Genhol creates the following input file.
global{
numhol = 1
outfile = "easter8.dat"
outspec = "easter8.reg"
first = 1990
last = 2015
period = 12
}
holiday1{
name = easter8
begbefore = -8
endbefore = -1
infile = "easter500.txt"
center = calendar
}
Note that the dates of Easter holiday is provided in the file easter500.txt. The first 15 lines of the file are given below:
4 2 1600
4 22 1601
4 7 1602
3 30 1603
4 18 1604
4 10 1605
3 26 1606
4 15 1607
4 6 1608
4 19 1609
4 11 1610
4 3 1611
4 22 1612
4 7 1613
3 30 1614
4 19 1615
To create the Easter8 regressor, simply select Easter8.inp from the list of input files and press the Run Genhol button or just double click on Easter8.inp.
This will generate one holiday regressor for the Easter holiday, stored in easter8.dat. The regression variable is stored in X-13ARIMA-SEATS's datevalue format; the first 18 lines of the file are given below:
1990 1 0.0
1990 2 0.0
1990 3 -0.382
1990 4 0.382
1990 5 0.0
1990 6 0.0
1990 7 0.0
1990 8 0.0
1990 9 0.0
1990 10 0.0
1990 11 0.0
1990 12 0.0
1991 1 0.0
1991 2 0.0
1991 3 0.618
1991 4 -0.618
1991 5 0.0
1991 6 0.0
X-13ARIMA-SEATS commands to incorporate these regressors into a regARIMA model will also be stored into a file named easter8.reg. The contents of this file are given below:
regression{
user=(
Beforeeaster8
)
file="easter8.dat"
format="datevalue"
# start=1990.1
usertype=holiday
}
Zhang, McLaren, and Leung (2003) developed an alternate Easter regressor for Australian series at the Australian Bureau of Statistics (henceforth ABS). Their model consisted of two regressors, one which modeled an assumed increase in the level of the series before Good Friday, and another to handle the period between Good Friday and Easter Monday, a national holiday in Australia, where a decrease in level is expected.
This example will show how to create user-defined regressors for the ABS Easter regressor. Start with a global spec and name the input file abseaster.inp. The two output files will automatically be named abseaster as well.
Next set the options for the holiday spec for the two part easter regressor by selecting the easter dates file again and then identifying the two holiday effect windows. The first window is from 8 days before Easter to 3 days before Easter and the second window is from 2 days before Easter (Good Friday) to 1 day after Easter (Easter Monday).
A sample input file (abseaster.inp) is given below:
global{
numhol = 1
outfile = "abseaster.dat"
outspec = "abseaster.reg"
first = 1990
last = 2015
period = 12
}
holiday1{
name = abseaster
begbefore = -8
endbefore = -3
begafter = 2
infile = "easter500.txt"
center = calendar
}
To run this file, select abseaster.inp from the Genhol Input Files list and press the Run Genhol button.
This will generate two (2) holiday regressors in the file abseaster.dat - a regressor for the period before Good Friday, and another regressor for the period between Good Friday and Easter Monday, inclusive.
X-13ARIMA-SEATS commands to incorporate these regressors into a regARIMA model will also be stored as a file named abseaster.reg. The contents of this file are given below:
regression{
user=(
Beforeabseaster Betweenabseaster
)
file="abseaster.dat"
format="datevalue"
# start=1990.1
usertype=holiday
}
This utility uses the method outlined in Findley (2009) to generate stock holiday regressors. To generate an end-of-month stock Easter regressor approximately like that specified in X-13ARIMA-SEATS as easterstock[8] (see Monsell (2009) for more details), an input file like the following is needed:
global{
numhol = 1
outfile = "stockeaster8.dat"
outspec = "stockeaster8.reg"
first = 1990
last = 2015
period = 12
stockday = 31
}
holiday1{
name = stockeaster8
begbefore = -8
endbefore = -1
infile = "easter500.txt"
center = calendar
}
To create this input file with Win Genhol, identify the names of the input and output files and first and last year as before, but now check the Stock series box and set the Stock day box to 31.
The holiday spec is the same as the first example, we just change the name of the regressor to stockeaster8.
To generate a stock Easter regressor for another sample day, such as the 28th day of the month, select 28 from the Stock day drop down box in the Global Spec window.
This example will create a file containing user-defined regressors for Chinese New Year and Idul Fitri, an Islamic holiday that marks the end of Ramadan. For this example, both the Chinese New Year holiday effect and the Idul Fitri holiday effect will be comprised of three parts each for a total of 6 regressors.
For the Global Spec, name the input file "indhol" and change the number of holidays to two.
Notice that the Holiday Spec window now has two tabs. In the first tab set up the Chinese New Year regressors. Here we will define the three part Chinese New Year effect over three windows:
In the second tab set up the Idul Fitri regressors. Since Idul Fitri moves through all of the months, we set the centering to "Mean". All of the holidays we have looked at so far have had centering set to "Calendar" because they can only occur in a couple of months. The three part Idul Fitri effect for this example consists of the following three effect windows
These options will create the input file (indhol.inp) given below:
global{
numhol = 2
outfile = "indhol.dat"
outspec = "indhol.reg"
period = 12
type = ratio
}
holiday1{
name = CNY
begbefore = -10
endbefore = -1
begafter = 5
endafter = 14
infile = "cnyInd.dat"
center = calendar
}
holiday2{
name = IdulFitri
begbefore = -42
endbefore = -21
begafter = 1
endafter = 7
infile = "IFHolInd.dat"
center = mean
}
This will generate six (6) holiday regressors in the file indhol.reg - three Chinese New Year regressors (for before, after and intermediate holiday effects), and Idul Fitri regressors (for before, after and intermediate holiday effects). X-13ARIMA-SEATS commands to incorporate these regressors into a regARIMA model will be stored as a file named indhol.reg. The contents of this file are given below:
regression{
user=(
BeforeCNY BetweenCNY AfterCNY
BeforeIdulFitri BetweenIdulFitri AfterIdulFitri
)
file="indhol.dat"
format="datevalue"
# start=1970.1
usertype=holiday
}