------------------------------------------------------------------------------- help forbking8-------------------------------------------------------------------------------

Apply Baxter-King band pass filter to time series

bking8varlist[ifexp] [inrange],plo(#)phi(#)stub(abbrev)[k(#)]

bking8is for use in Stata 8.2. Users of more recent versions of Stata should usebking, which makes use of Mata.You must

tssetyour data before usingbking8; see helptsset. If a panel calendar is in effect, the filter can be applied if a single panel is specified usingiforinqualifiers.

varlistmay contain time-series operators; see helpvarlist.

bking8filters one or more time series using the Baxter-King symmetric band-pass filter described in Baxter and King (1995). If a panel calendar is in effect, the filter can be applied if a single panel is specified using if or in qualifiers. Theplo()andphi()arguments specify the minimum period of oscillation and maximum period of oscillation of the desired component of the time series, where 2 < plo < phi < infinity. The "Burns-Mitchell" settings for this filter, applied to quarterly data, are 6 and 32 quarters, with k=12.You should

set matsize 800before calling this routine. Due to the matrix size limits, a timeseries longer than 800 periods cannot be handled by this routine in Intercooled Stata.

Optionsplo(#)andphi(#)specify the minimum and maximum period of oscillation to be retained in the time series, and must be given. For quarterly data, common values are 6 and 32, which preserve the components of the data with period between 1.5 and 8.0 years, with k=12 (which loses three years' data from each end of the filtered series). For monthly data, common values are 18 and 96, which preserves the component of the data with period between 1.5 and 8.0 years. For annual data, common values are 2 and 8, with k=3.

stub(abbrev), which must be provided, specifies the "stub" from which new variable names will be created. Variables created bystubmust be new variables. If thevarlistcontains time-series operators, the dots in their names are replaced by underscores so that the resulting new variables' names are legal.

k(#)specifies the lead-lag length of the filter. This many observations will be lost at each end of the filtered series. If not specified,kis set to 12 (Baxter and King's recommended value for quarterly data).

Examples. webuse lutkepohl,clear

. bking8 investment, plo(6) phi(32) stub(F)

. bking8 investment income consumption, plo(6) phi(32) k(8) stub(filt)

. bking8 D.investment, plo(4) phi(12) stub(fl)

AuthorChristopher F. Baum, Boston College, USA baum@bc.edu

ReferencesMarianne Baxter and Robert G. King, Measuring Business Cycles: Approximate Band-Pass Filters for Economic Time Series. Review of Economics and Statistics, 1999, 81(4), 575-593.

Lawrence J. Christiano and Terry J. Fitzgerald, The Band Pass Filter, International Economic Review, 2003, 44(2), 435-465.

AcknowledgementsThis code is based on Eduard Pelz' MATLAB implementation of the Baxter-King filter, available from http://www.clev.frb.org/research/workpaper/1999/bpassm.txt and has been validated against that code for selected series.

Also see