Skip Main Navigation Skip To Navigation Content

X-13ARIMA-SEATS Seasonal Adjustment Program

You are here: Census.govSubjects A to ZX-13ARIMA-SEATSGenhol › Genhol Examples
Skip top of page navigation

Running Genhol - Examples

Index of Examples

  1. Generating an Easter holiday regressor
  2. Generating a 2-part Easter holiday regressor
  3. Generating a stock Easter holiday regressor
  4. Generating a set of regressors for more than one holiday
  5. Generating an Easter holiday regressor

    This example will create a file containing user-defined regressors for Easter. 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]). A sample input file (easter8.inp) is given below:

    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 run this file, enter

    genhol 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_500.dat"
       format="datevalue"
       start=1980.1
       usertype=holiday
    }
    

    Back to the Top


    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. 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, enter

    genhol abseaster.inp

    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
    }
    

    Back to the Top


    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 generate a stock Easter regressor for another sample day, such as the 28th day of the month, an input file like the following is needed:

    global{
            numhol = 1
            outfile = "stockeaster8d28.dat"
            outspec = "stockeaster8d28.reg"
            first = 1990
            last = 2015
            period = 12
            stockday = 28
    }
    holiday1{
            name = stockeaster8d28
            begbefore = -8
            endbefore = -1
            infile = "easter500.txt"
            center = calendar
    }
    

    Back to the Top


    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. A sample input file (indhol.inp) is given below:

    global{
            numhol = 2
            outfile = "indhol.dat"
            outspec = "indhol.reg"
    }
    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
    }
    

    To run this file, enter

    genhol indhol.inp

    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
    }
    

Source: U.S. Census Bureau | Center for Statistical Research and Methodology | (301) 763-1649 (or x12@census.gov) |  Last Revised: April 02, 2015