Skip to content

Running Win Genhol - Examples

Nikki Czaplicki and Brian C. Monsell
Component ID: #ti1530915017

1. Generating an Easter holiday regressor

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.

Component ID: #ti967259636

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).

Component ID: #ti1980804549

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.

Component ID: #ti1027958874

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
    }

Component ID: #ti1299021953
Component ID: #ti1707036301

2. Generating a 2-part Easter holiday regressor

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.

Component ID: #ti1329688688

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).

Component ID: #ti630072401

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
    }

Component ID: #ti1455012027
Component ID: #ti1541147337

3. Generating a stock Easter holiday regressor

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.

Global Spec with stock Easter settings

The holiday spec is the same as the first example, we just change the name of the regressor to stockeaster8.

Holiday Spec with stock Easter settings

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.

Global Sepc with stock Easter settings, stock day 28

Component ID: #ti1554627433
Component ID: #ti1934992407

4. Generating a set of regressors for more than one holiday

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.

Component ID: #ti1572439598

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:

  • 10 days before to the holiday to 1 day before
  • the day of the holiday to 4 days after the holiday
  • 5 days after the holiday to 14 days after.

Component ID: #ti1342462408

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

  • 42 days before the holiday to 21 days before
  • 20 days before the holiday to the day of the holiday
  • 1 day after the holiday to 7 days after the holiday.

Component ID: #ti1798943133

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
    }

Component ID: #ti167166805
Component ID: #ti583072813

5. References

  • Findley, D. F. (2009), Stock Series Holiday Regressors Generated By Flow Series Holiday Regressors, Center for Statistical Research and Methodology Research Report Series (Statistics No. 2009-04). U.S. Census Bureau [Online]. Available: https://www.census.gov/srd/papers/pdf/rrs2009-04.pdf .
  • Monsell, B. C. (2009), Update on the Development of X-13ARIMA-SEATS, JSM Proceedings, Business and Economic Statistics Section. Alexandria, VA: American Statistical Association. Available: https://www.census.gov/ts/papers/jsm09bcm.pdf.
  • Zhang, X., McLaren, C. H., and Leung, C. C. S. (2003), An Easter proximity effect: Modelling and adjustment, Australian and New Zealand Journal of Statistics, 43, 269-280.

Component ID: #ti1193559680
X
  Is this page helpful?
Thumbs Up Image Yes    Thumbs Down Image No
X
No, thanks
255 characters remaining
X
Thank you for your feedback.
Comments or suggestions?