Unformatted text preview: IDEOLOG: A PROGRAM FOR FILTERING
ECONOMETRIC DATA—A SYNOPSIS
OF ALTERNATIVE METHODS
By D.S.G. POLLOCK
University of Leicester
Email: stephen [email protected]
An account is given of various ﬁltering procedures that have been implemented in a
computer program, which can be used in analysing econometric time series. The program provides some new ﬁltering procedures that operate primarily in the frequency
domain. Their advantage is that they are able to achieve clear separations of components of the data that reside in adjacent frequency bands in a way that the conventional
timedomain methods cannot.
Several procedures that operate exclusively within the time domain have also been
implemented in the program. Amongst these are the bandpass ﬁlters of Baxter and
King and of Christiano and Fitzgerald, which have been used in estimating business
cycles. The Henderson ﬁlter, the Butterworth ﬁlter and the Leser or Hodrick–Prescott
ﬁlter are also implemented. These are also described in this paper
Econometric ﬁltering procedures must be able to cope with the trends that are
typical of economic time series. If a trended data sequence has been reduced to stationarity by diﬀerencing prior to its ﬁltering, then the ﬁltered sequence will need to be
reinﬂated. This can be achieved within the time domain via the summation operator,
which is the inverse of the diﬀerence operator. The eﬀects of the diﬀerencing can also
be reversed within the frequency domain by recourse to the frequencyresponse function
of the summation operator. 1. Introduction
This paper gives an account of some of the facilities that are available in a new
computer program, which implements various ﬁlters that can be used for extracting
the components of an economic data sequence and for producing smoothed and
seasonallyadjusted data from monthly and quarterly sequences.
The program can be downloaded from the following web address:
http://www.le.ac.uk/users/dsgp1/
It is accompanied by a collection of data and by three log ﬁles, which record steps
that can be taken in processing some typical economic data. Here, we give an
account of the theory that lies behind some of the procedures of the program.
The program originated in a desire to compare some new methods with existing procedures that are common in econometric analyses. The outcome has been
a comprehensive facility, which will enable a detailed investigation of univariate
econometric time series. The program will also serve to reveal the extent to which
1 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
the results of an economic analysis might be the consequence of the choice of a
particular ﬁltering procedure.
The new procedures are based on the Fourier analysis of the data, and they
perform their essential operations in the frequency domain as opposed to the time
domain. They depend upon a Fourier transform for carrying the data into the
frequency domain and upon an inverse transform for carrying the ﬁltered elements
back to the time domain. Filtering procedures usually operate exclusively in the
time domain. This is notwithstanding fact that, for a proper understanding of the
eﬀects of a ﬁlter, one must know its frequencyresponse function.
The sections of this paper give accounts of the various classes of ﬁlters that
have been implemented in the program. In the ﬁrst category, to which section 2
is devoted, are the simple ﬁnite impulse response (FIR) or linear movingaverage
ﬁlters that endeavour to provide approximations to the socalled ideal frequencyselective ﬁlters. Also in this category of FIR ﬁlters is the timehonoured ﬁlter of
Henderson (1916), which is part of a seasonaladjustment program that is widely
used in central statistical agencies.
The second category concerns ﬁlters of the inﬁnite impulse response (IIR)
variety, which involve an element of feedback. The ﬁlters of this category that are
implemented in the program are all derived according to the Wiener–Kolmogorov
principle. The principle has been enunciated in connection with the ﬁltering of
stationary and doublyinﬁnite data sequences—see Whittle (1983), for example.
However, the purpose of the program is to apply these ﬁlters to short non stationary
sequences. In section 3, the problem of non stationarity is broached, whereas, in
section 4, the adaptations that are appropriate to short sequences are explained.
Section 5 deals with the new frequencydomain ﬁltering procedures. The details
of their implementation are described and some of their uses are highlighted. In
particular, it is shown how these ﬁlters can achieve an ideal frequency selection,
whereby all of the elements of the data that fall below a given cutoﬀ frequency are
preserved and all those that fall above it are eliminated.
2. The FIR ﬁlters
One of the purposes in ﬁltering economic data sequences is to obtain a representation of the business cycle that is free from the distractions of seasonal ﬂuctuations
and of highfrequency noise. According to Baxter and King (1999), the business
cycle should comprise all elements of the data that have cyclical durations of no
less than of one and a half years and not exceeding eight years. For this purpose,
they have proposed to use a movingaverage bandpass ﬁlter to approximate the
ideal frequencyselective ﬁlter. An alternative approximation, which has the same
purpose, has been proposed by Christiano and Fitzgerald (2003). Both of these
ﬁlters have been implemented in the program.
A stationary data sequence can be resolved into a sum of sinusoidal elements
whose frequencies range from zero up to the Nyquist frequency of π radians per
sample interval, which represents the highest frequency that is observable in sam2 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 1.25
1
0.75
0.5
0.25
0
0 π/4 π/2 3π/4 π Figure 1. The frequency response of the truncated bandpass ﬁlter of 25 coeﬃcients superimposed upon the ideal frequency response. The lower cutoﬀ point
is at π/16 radians (11.25◦ ), corresponding to a period of 32 quarters, and the
upper cutoﬀ point is at π/3 radians (60◦ ), corresponding to a period of the 6
quarters. pled data. A data sequence {yt , t = 0, 1, . . . , T − 1} comprising T = 2n observations
has the following Fourier decomposition:
n {αj cos(ωj t) + βj sin(ωj t)}. yt = (1) j =0 Here, ωj = 2πj/T ; j = 0, . . . , n, are the Fourier frequencies, which are equally
spaced in the interval [0, π ], whereas αj , βj are the associated Fourier coeﬃcients,
which indicate the amplitudes of the sinusoidal elements of the data sequence. An
ideal ﬁlter is one that transmits the elements that fall within a speciﬁed frequency
band, described as the pass band, and which blocks elements at all other frequencies,
which constitute the stop band.
In representing the properties of a linear ﬁlter, it is common to imagine that it
is operating on a doublyinﬁnite data sequence of a statistically stationary nature.
Then, the Fourier decomposition comprises an inﬁnity of sinusoidal elements of
negligible amplitudes whose frequencies form a continuum in the interval [0, π ].
The frequencyresponse function of the ﬁlter displays the factors by which the
amplitudes of the elements are altered in their passage through the ﬁlter.
For an ideal ﬁlter, the frequency response is unity within the pass band and
zero within the stop band. Such a response is depicted in Figure 1, where the
pass band, which runs from π/16 to π/3 radians per sample interval, is intended
to transmit the elements of a quarterly econometric data sequence that constitute
the business cycle.
To achieve an ideal frequency selection with a linear movingaverage ﬁlter
would require an inﬁnite number of ﬁlter coeﬃcients. This is clearly impractical;
3 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
and so the sequence of coeﬃcients must be truncated, whereafter it may be modiﬁed
in certain ways to diminish the adverse eﬀects of the truncation.
Approximation to the Ideal Filter
Figure 1 also shows the frequency response of a lter that has been derived by
taking twentyﬁve of the central coeﬃcients of the ideal ﬁlter and adjusting their
values by equal amounts so that they sum to zero. This is the ﬁlter that has been
proposed by Baxter and King (1999) for the purpose of extracting the business
cycle from economic data. The ﬁlter is aﬀected by a considerable leakage, whereby
elements that fall within the stop band are transmitted in part by the ﬁlter.
The z transform of a sequence {ψj } of ﬁlter coeﬃcients is the polynomial
ψ (z ) =
j ψj z . Constraining the coeﬃcients to sum to zero ensures that the
polynomial has a root of unity, which is to say that ψ (1) =
j ψj = 0. This
implies that ∇(z ) = 1 − z is a factor of the polynomial, which indicates that the
ﬁlter incorporates a diﬀerencing operator.
If the ﬁlter is symmetric, such that ψ (z ) = ψ0 + ψ1 (z + z −1 )+ · · · + ψq (z q + z −q )
and, therefore, ψ (z ) = ψ (z −1 ), then 1 − z −1 is also a factor. Then, ψ (z ) has
the combined factor (1 − z )(1 − z −1 ) = −z ∇(z )2 , which indicates that the ﬁlter
incorporates a twofold diﬀerencing operator. Such a ﬁlter is eﬀective in reducing a
linear trend to zero; and, therefore, it is applicable to econometric data sequences
that have an underlying loglinear tend.
The ﬁlter of Baxter and King (1999), which fulﬁls this condition, is appropriate
for the purpose of extracting the business cycle from a trended data sequence.
Figure 2 shows the logarithms of data of U.K. real domestic consumption for the
years 1955–1994 through which a linear trend has been interpolated. Figure 3 shows
the results of subjecting these data to the Baxter–King ﬁlter. A disadvantage of
the ﬁlter, which is apparent in Figure 3, is that it is incapable of reaching the ends
of the sample. The ﬁrst q sample values and the last q remain unprocessed.
To overcome this diﬃculty, Christiano and Fitzgerald (2003) have proposed a
ﬁlter with a variable set of coeﬃcients. To generate the ﬁltered value at time t, they
associate the central coeﬃcient ψ0 with yt . If yt−p falls within the sample, then
they associate it with the coeﬃcient ψp . Otherwise, if it falls outside the sample, it
is disregarded. Likewise, if yt+p falls within the sample, then it is associated with
ψp , otherwise it is disregarded. If the data follow a ﬁrstorder random walk, then
the ﬁrst and the last sample elements y0 and yT −1 receive extra weights A and B ,
which correspond to the sums of the coeﬃcients discarded from the ﬁlter at either
end. The resulting ﬁltered value at time t may be denoted by
xt = Ay0 + ψt y0 + · · · + ψ1 yt−1 + ψ0 yt
+ ψ1 yt+1 + · · · + ψT −1−t yT −1 + ByT −1 . (2) This equation comprises the entire data sequence y0 , . . . , yT −1 ; and the value
of t determines which of the coeﬃcients of the inﬁnitesample ﬁlter are involved
4 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 11.5
11
10.5
10
1960 1970 1980 1990 Figure 2. The quarterly sequence of the logarithms of consumption in the
U.K., for the years 1955 to 1994, together with a linear trend interpolated by
leastsquares regression. 0.05
0.04
0.03
0.02
0.01
0
−0.01
−0.02
−0.03
−0.04
0 50 100 150 Figure 3. The sequence derived by applying the truncated bandpass ﬁlter of
25 coeﬃcients to the quarterly logarithmic data on U.K. Consumption. 0.15
0.1
0.05
0
−0.05
−0.1
0 50 100 150 Figure 4. The sequence derived by applying the bandpass ﬁlter of Christiano
and Fitzgerald to the quarterly logarithmic data on U.K. Consumption. 5 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
in producing the current output. Thus, the value of x0 is generated by looking
forwards to the end of the sample, whereas the value of xT −1 is generated by
looking backwards to the beginning of the sample.
For data that appear to have been been generated by a ﬁrstorder random walk
with a constant drift, it is appropriate to extract a linear trend before ﬁltering the
residual sequence. Figure 4 provides an example of the practice. In fact, this has
proved to be the usual practice in most circumstances.
Within the category of FIR ﬁlters, the program also implements the time
honoured smoothing ﬁlter of Henderson (1916), which forms an essential part of
the detrending procedure of the X11 program of the Bureau of the Census. This
program provides the method of seasonal adjustment that is used predominantly
by central statistical agencies.
Here, the endofsample problem is overcome by supplementing the Henderson
ﬁlter with a set of asymmetric ﬁlters that can be applied to the elements of the ﬁrst
and the ﬁnal segments. These are the Musgrave (1964) ﬁlters. (See Quenneville,
Ladiray and Lefranc, 2003 for a recent account of these ﬁlters.) In the X11 ARIMA
variant, which is used by Statistics Canada, the alternative recourse is adopted of
extrapolating the data beyond the ends of the sample so that it can support a
timeinvariant ﬁlter that does run to the ends.
3. The Wiener–Kolmogorov Filters
The program also provides several ﬁlters of the feedback variety that are commonly
described as inﬁniteimpulse response (IIR) ﬁlters. The ﬁlters in question are derived according to the ﬁnitesample Wiener–Kolmogorov principle that has been
expounded by Pollock (2000, 2007).
The ordinary theory of Wiener–Kolmogorov ﬁltering assumes a doublyinﬁnite
data sequence y (t) = ξ (t) + η (t) = {yt ; t = 0, ±1, ±2, . . .} generated by a stationary
stochastic process. The process is compounded from a signal process ξ (t) and a
noise process η (t) that are assumed to be statistically independent and to have
zerovalued means. Then, the autocovariance generating function of y (t) is given
by
(3)
γy (z ) = γξ (z ) + γη (z ),
which is sum of the autocovariance functions of ξ (t) and η (t).
The object is to extract estimates of the signal sequence ξ (t) and noise sequence
η (t) from the data sequence. The z transforms of the relevant ﬁlters are
βξ (z ) = γξ (z )
ψξ (z −1 )ψξ (z )
=
,
γξ (z ) + γη (z )
φ(z −1 )φ(z ) (4) βη (z ) = γη (z )
ψη (z −1 )ψη (z )
=
.
γξ (z ) + γη (z )
φ(z −1 )φ(z ) (5) and 6 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
It can been that βξ (z ) + βη (z ) = 1, in view of which the ﬁlters can be described as
complementary.
The factorisations of the ﬁlters that are given on the RHS enable them to be
applied via a bidirectional feedback process. In the case of the signal extraction
ﬁlter βξ (z ), the process in question can be represented by the equations
φ(z )q (z ) = ψξ (z )y (z ) φ(z −1 )x(z ) = ψξ (z −1 )q (z −1 ), and (6) wherein q (z ), y (z ) and x(z ) stand for the z transforms of the corresponding sequences q (t), y (t) and x(t).
To elucidate these equations, we may note that, in the ﬁrst of them, the expression associated with z t is
m n φj qt−j =
j =0 ψξ,j yt−j . (7) j =0 Given that φ0 = 1, this serves to determine the value of qt . Moreover, given that
the recursion is assumed to be stable, there need be no restriction on the range
of t. The ﬁrst equation, which runs forward in time, generates an intermediate
output q (t). The second equation, which runs backwards in time, generates the
ﬁnal ﬁltered output x(t).
Filters for Trended Data
The classical Wiener–Kolmogorov theory can be extended in a straightforward
way to cater for non stationary data generated by integrated autoregressive movingaverage (ARIMA) processes in which the autoregressive polynomial contains roots
of unit value. Such data processes can be described by the equation
y (z ) = δ (z )
+ η (z )
∇p (z ) or, equivalently, ∇p (z )y (z ) = δ (z ) + ∇p (z )η (z ), (8) where δ (z ) and η (z ) are, respectively, the z transforms of the mutually independent
stationary stochastic sequences δ (t) and η (t), and where ∇p (z ) = (1 − z )p is the
pth power of the diﬀerence operator.
Here, there has to be some restriction on the range of t together with the
condition that the elements δt and ηt are ﬁnite within this range. Also, the z transform must comprise the appropriate initial conditions, which are eﬀectively
concealed by the notation. (See Pollock 2008 on this point.)
Within the program, two such ﬁlters have been implemented. The ﬁrst is the
ﬁlter of Leser (1961) and of Hodrick and Prescott (1980, 1997), which is designed to
extract the non stationary signal or trend component when the data are generated
according to the equation
∇2 (z )y (z ) = g (z ) = δ (z ) + ∇2 (z )η (z ),
7 (9) D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 1.00
0.75
16 0.50 1 64 0.25 4 0.00
0 π/4 π/2 3π/4 π Figure 5. The frequencyresponse function of the Hodrick–Prescott smoothing
ﬁlter for various values of the smoothing parameter λ. 1
0.75
0.5
0.25
0
0 π/4 π/2 3π/4 π Figure 6. The frequencyresponse function of the lowpass Butterworth ﬁlters
of orders n = 6 and n = 12 with a nominal cutoﬀ point of 2π/3 radians. where δ (t) are η (t) are mutually independent sequences of independently and identically distributed random variables, generated by socalled whitenoise processes.
2
2
2
With γδ (z ) = σδ and γξ (z ) = σδ ∇(z −1 )∇(z ) and with γη (z ) = ση , the z transforms
of the relevant ﬁlters become
1
βξ (z ) =
,
(10)
2 (z −1 )∇2 (z )
1 + λ∇
and
βη (z ) = ∇2 (z −1 )∇2 (z )
,
λ−1 + ∇2 (z −1 )∇2 (z ) (11) 2
2
where λ = ση /σδ , which is described as the smoothing parameter.
The frequencyresponse functions of the ﬁlters for various values of λ are shown
in Figure 5. These are obtained by setting z = e−iω = cos(ω ) − i sin(ω ) in the 8 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM Im Im i −1 i 1 Re −1 −i 1 Re −i Figure 7. The pole–zero diagrams of the lowpass Butterworth ﬁlters for n = 6
when the cutoﬀ is at ω = π/2 (left) and at ω = π/8. formula of (10) and by letting ω run from 0 to π . (In the process, the imaginary
quantities are cancelled so as to give rise to the realvalued functions that are plotted
in the diagram.)
It is notable that the speciﬁcation of the underlying process y (t), in which
both the signal component ξ (z ) = δ (z )/∇(z ) and the noise component η (z ) have
spectral density functions that extend over the entire frequency range, precludes
the clear separation of the components. This is reﬂected in the fact that, for all but
the highest values λ, the ﬁlter transmits signiﬁcant proportions of the elements at
all frequencies.
The second of the Wiener–Kolmogorov ﬁlters that are implemented in the
program is capable of a much ﬁrmer discrimination between the signal and noise
than is the Leser (1961) ﬁlter. This is the Butterworth (1930) ﬁlter, which was
originally devised as an analogue ﬁlter but which can also be rendered in digital
form—See Pollock (2000). The ﬁlter is appropriate for extracting the component
(1 + z )n δ (z ) from the sequence
g (z ) = (1 + z )n δ (z ) + (1 − z )n κ(z ). (12) Here, δ (t) and κ(t) denote independent whitenoise processes, whereas there is
usually g (z ) = ∇2 (z )y (z ), where y (t) is the data process. This corresponds to the
case where twofold diﬀerencing is required to eliminate a trend from the data. Under
these circumstances, the equation of the data process is liable to be represented by
y (z ) = ξ (z ) + η (z )
(1 + z )n
δ (z ) + (1 − z )n−2 κ(z ).
=
2 (z )
∇ (13) However, regardless of the degree of diﬀerencing to which y (t) must be subjected
9 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
in reducing it to stationarity, the z transforms of the complementary ﬁlters will be
(1 + z −1 )n (1 + z )n
,
(1 + z −1 )n (1 − z )n + λ(1 − z −1 )n (1 + z )n (14) (1 − z −1 )n (1 − z )n
,
(1 + z −1 )n (1 − z )n + λ−1 (1 − z −1 )n (1 + z )n (15) βξ (z ) =
and
βη (z ) = 2
2
where λ = σκ /σδ .
It is straightforward to determine the value of λ that will place the cutoﬀ
of the ﬁlter at a chosen point ωc ∈ (0, π ). Consider setting z = exp{−iω } in the
formula of (14) of the lowpass ﬁlter. This gives the following expression for the
gain:
1
βξ (e−iω ) =
2n
1 − e−iω
1+λ i
1 + e−iω
(16) = 1
1 + λ tan(ω/2) 2n . At the cutoﬀ point, the gain must equal 1/2, whence solving the equation
βξ (exp{−iωc }) = 1/2 gives λ = {1/ tan(ωc /2)}2n .
Figure 6 shows how the rate of the transition of the Butterworth frequency
response between the pass band and the stop band is aﬀected by the order of the
ﬁlter. Figure 7 shows the pole–zero diagrams of ﬁlters with diﬀerent cutoﬀ points.
As the cutoﬀ frequency is reduced, the transition between the two bands becomes
more rapid. Also, some of the poles of the ﬁlter move towards the perimeter of the
unit circle.
A Filter for Seasonal Adjustment
The Wiener–Kolmogorov principle is also used in deriving a ﬁlter for the seasonal adjustment of monthly and quarterly econometric data. The ﬁlter is derived
from a model that combines a whitenoise component η (t) with a seasonal component obtained by passing an independent white noise ν (t) through a rational
ﬁlter with poles located on the unit circle at angles corresponding to the seasonal
frequencies and with corresponding zeros at the same angles but located inside the
circle. The z transform of the output sequence gives
R(z )
ν (z ) or
S (z )
S (z )y (z ) = S (z )η (z ) + R(z )ν (z ),
y (z ) = η (z ) + where R(z ) = 1 + ρz + ρ2 z 2 + · · · + ρs−1 z s−1
10 (17) (18) D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 1
0.75
0.5
0.25
0
0 π/4 π/2 3π/4 π Figure 8. The gain of a ﬁlter for the seasonal adjustment of monthly data.
2
2
The deﬁning parameters are ρ = 0.9 and λ = ση /σν = 0.125 with ρ < 1, and S (z ) = 1 + z + z 2 + · · · + z s−1 . (19) The z transform of the seasonaladjustment ﬁlter is
2
ση S (z )S (z −1 )
β (z ) =
.
2
2
S (z )S (z −1 )ση + σν R(z )R(z −1 ) (20) Setting z = exp{−iω } and letting ω run from 0 to π generates the frequency
response of the ﬁlter, of which the modulus or gain is plotted in Figure 8 for the
2
2
case where ρ = 0.9 and λ = ση /σν = 0.125.
4. The FiniteSample Realisations of the W–K Filters
To derive the ﬁnitesample version of a Wiener–Kolmogorov ﬁlter, we may consider
a data vector y = [y0 , y1 , . . . , yt−1 , ] that has a signal component ξ and a noise
component η :
y = ξ + η.
(21)
The two components are assumed to be independently normally distributed with
zero means and with positivedeﬁnite dispersion matrices. Then,
E (ξ ) = 0, D(ξ ) = Ωξ , E (η ) = 0, D(η ) = Ωη , and C (ξ, η ) = 0.
A consequence of the independence of ξ and η is that D(y ) = Ωξ + Ωη .
11 (22) D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
The estimates of ξ and η , which may be denoted by x and h respectively, are
derived according to the following criterion:
Minimise S (ξ, η ) = ξ Ω−1 ξ + η Ω−1 η
η
ξ subject to ξ + η = y. (23) Since S (ξ, η ) is the exponent of the normal joint density function N (ξ, η ), the
resulting estimates may be described, alternatively, as the minimum chisquare
estimates or as the maximumlikelihood estimates.
Substituting for η = y − ξ gives the concentrated criterion function S (ξ ) =
ξ Ω−1 ξ + (y − ξ ) Ω−1 (y − ξ ). Diﬀerentiating this function in respect of ξ and setting
ξ
the result to zero gives a condition for a minimum, which speciﬁes the estimate x.
This is Ω−1 (y − x) = Ω−1 x, which, on pre multiplication by Ωη , can be written as
η
ξ
y = x − Ωη Ω−1 x = (Ωξ + Ωη )Ω−1 x. Therefore, the solution for x is
ξ
ξ
x = Ωξ (Ωξ + Ωη )−1 y. (24) Moreover, since the roles of ξ and η are interchangeable in this exercise, and, since
h + x = y , there are also
h = Ωη (Ωξ + Ωη )−1 y and x = y − Ωη (Ωξ + Ωη )−1 y. (25) The ﬁlter matrices Bξ = Ωξ (Ωξ + Ωη )−1 and Bη = Ωη (Ωξ + Ωη )−1 of (24) and (25)
are the matrix analogues of the z transforms displayed in equations (4) and (5).
A simple procedure for calculating the estimates x and h begins by solving the
equation
(26)
(Ωξ + Ωη )b = y
for the value of b. Thereafter, one can generate
x = Ωξ b and h = Ωη b. (27) If Ωξ and Ωη correspond to the narrowband dispersion matrices of movingaverage processes, then the solution to equation (26) may be found via a Cholesky
factorisation that sets Ωξ + Ωη = GG , where G is a lowertriangular matrix with
a limited number of nonzero bands. The system GG b = y may be cast in the form
of Gp = y and solved for p. Then, G b = p can be solved for b. The procedure has
been described by Pollock (2000).
Filters for Short Trended Sequences
To adapt these estimates to the case of trended data sequences may require
the provision of carefully determined initial conditions with which to start the
recursive processes. A variety of procedures are available that are similar, if not
identical, in their outcomes. The procedures that are followed in the program
depend upon reducing the data sequences to stationarity, in one way or another,
12 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
before subjecting them to the ﬁlters. After the data have been ﬁltered, the trend
is liable to be restored.
The ﬁrst method, which is the simplest in concept, requires the trend to be
represented by a polynomial function. In some circumstances, when the economy
has been experiencing steady growth, the polynomial will serve as a reasonable
characterisation of its underlying trajectory. Thus, in the period 1955–1994 a loglinear trend function provides a ﬁrm benchmark against which to measure the
cyclical ﬂuctuations of the U.K. economy. The residual deviations from this trend
may be subjected to a lowpass ﬁlter; and the ﬁltered output can be added to the
trend to produce a representation of what is commonly described as the trendcycle
component.
It is desirable that the polynomial trend should interpolate the scatter of points
at either end of the data sequence. For this purpose, the program provides a method
of weighted leastsquares polynomial regression with a wide choice of weighting
schemes, which allow extra weight to be placed upon the initial and the ﬁnal runs
of observations.
An alternative way of eliminating the trend is to take diﬀerences of the data.
Usually, twofold diﬀerencing is appropriate. The matrix analogue of the secondorder backwards diﬀerence operator in the case of T = 5 is given by
⎡ ∇2 =
5 Q∗
Q 1
0
⎢ −2 1
⎢
= ⎢ 1 −2
⎢
⎣
0
1
0
0 0
0
1
−2
1 ⎤
0
0⎥
⎥
⎥
0 0⎥.
⎦
10
−2 1
0
0 (28) The ﬁrst two rows, which do not produce true diﬀerences, are liable to be discarded.
In general, the pfold diﬀerences of a data vector of T elements will be obtained by
pre multiplying it by a matrix Q of order (T − p) × T . Applying Q to equation
(21) gives
Qy =Qξ+Qη
(29)
= δ + κ = g.
The dispersion matrices of the diﬀerenced vectors are
D(δ ) = Ωδ = Q D(ξ )Q and D(κ) = Ωκ = Q D(η )Q. (30) The estimates d and k of the diﬀerenced components are given by
d = Ωδ (Ωδ + Q Ωη Q)−1 Q y
and (31) k = Q Ωη Q(Ωδ + Q Ωη Q)−1 Q y . (32) 13 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
To obtain estimates of ξ and η , the estimates of their diﬀerence versions must be
reinﬂated via an antidiﬀerencing or summation operator. We begin by observing
that the inverse of ∇2 is a twofold summation operator given by
5
⎡ ∇−2 = [ S∗
5 1
⎢2
S ] = ⎢3
⎣
4
5 0
1
2
3
4 



 0
0
1
2
3 0
0
0
1
2 ⎤
0
0⎥
0⎥.
⎦
0
1 (33) The ﬁrst two columns, which constitute the matrix S∗ , provide a basis for all linear
functions deﬁned on {t = 0, 1, . . . , T − 1 = 5}. The example can be generalised to
the case of a matrix ∇−p of order T . However, in the program, the maximum order
T
of diﬀerencing is p = 2.
We observe that, if g∗ = Q∗ y and g = Q y are available, then y can be recovered
via the equation
y = S∗ g + Sg.
(34)
In eﬀect, the elements of g∗ , which may be regarded as polynomial parameters,
provide the initial conditions for the process of summation or integration, which we
have been describing as a process of reinﬂation.
The equations by which the estimates of ξ and η may be recovered from those
of δ and κ are analogous to equation (34). They are
x = S∗ d∗ + Sd and h = S∗ k∗ + Sk. (35) In this case, the initial conditions d∗ and k∗ require to be estimated. The appropriate estimates are the values that minimise the function
(y − x) Ω−1 (y − x) = (y − S∗ d∗ − Sd) Ω−1 (y − S∗ d∗ − Sd)
η
η
= (S∗ k∗ + Sk ) Ω−1 (S∗ k∗ + Sk ).
η
These values are
and (36) k∗ = −(S∗ Ω−1 S∗ )−1 S∗ Ω−1 Sk
η
η (37) d∗ = (S∗ Ω−1 S∗ )−1 S∗ Ω−1 (y − Sd).
η
η (38) Equations (37) and (38) together with (31) and (32) provide a complete solution to the problem of estimating the components of the data. However, it is
possible to eliminate the initial conditions from the system of estimating equations.
This can be achieved with the help of the following identity:
P∗ = S∗ (S∗ Ω−1 S∗ )−1 S∗ Ω−1
η
η
= I − Ωη Q(Q Ωη Q)−1 Q = I − PQ .
14 (39) D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
In these terms, the equation of (35) for h becomes h = (I − P∗ )Sk = PQ Sk . Using
the expression for k from (32) together with the identity Q S = IT −2 gives
h = Ωη Q(Ωδ + Q Ωη Q)−1 Q y . (40) This can also be obtained from the equation (32) for k by the removal of the leading
diﬀerencing matrix Q . It follows immediately that
x=y−h
= y − Ωη Q(Ωδ + Q Ωη Q)−1 Q y . (41) The elimination of the initial conditions is due to the fact that η is a stationary
component. Therefore, it requires no initial conditions other than the zeros that
are the appropriate estimates of the presample elements. The direct estimate x of
ξ does require initial conditions, but, in view of the addingup conditions of (21),
x can be obtained more readily by subtracting from y the estimate h of η , in the
manner of equation (41).
Observe that, since
f = S∗ (S∗ S∗ )−1 S∗ y
(42)
is an expression for the vector of the ordinates of a polynomial function ﬁtted to the
data by an ordinary leastsquares regression, the identity of (39) informs us that
f = y − Q(Q Q)−1 Q y (43) is an alternative expression.
The residuals of an OLS polynomial regression of degree p, which are given by
y − f = Q(Q Q)−1 Q y , contain same the information as the vector g = Q y of the
pth diﬀerences of the data. The diﬀerence operator has the eﬀect of nullifying the
element of zero frequency and of attenuating radically the adjacent lowfrequency
elements. Therefore, the lowfrequency spectral structures of the data are not perceptible in the periodogram of the diﬀerenced sequence. Figure 9 provides evidence
of this.
On the other hand, the periodogram of a trended sequence is liable to be
dominated by its lowfrequency components, which will mask the other spectral
structures. However, the periodogram of the residuals of the polynomial regression
can be relied upon to reveal the spectral structures at all frequencies. Moreover,
by varying the degree p of the polynomial, one is able to alter the relative emphasis
that is given to highfrequency and lowfrequency structures. Figure 10 shows that
the lowfrequency structure of the U.K. consumption data is fully evident in the
periodogram of the residuals from ﬁtting a linear trend to the logarithmic data.
A Flexible Smoothing Filter
A derivation of the estimator of ξ is available that completely circumvents
the problem of the initial conditions. This can be illustrated with the case of a
15 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 0.03
0.02
0.01
0
0 π/4 π/2 3π/4 π Figure 9. The periodogram of the ﬁrst diﬀerences of the U.K. logarithmic
consumption data. 0.01
0.0075
0.005
0.0025
0
0 π/4 π/2 3π/4 π Figure 10. The periodogram of the residual sequence obtained from the linear
detrending of the logarithmic consumption data. A band, with a lower bound of
π/16 radians and an upper bound of π/3 radians, is masking the periodogram. generalised version of the Leser (1961) ﬁlter in which the smoothing parameter
is permitted vary over the course of the sample. The values of the smoothing
parameter are contained in the diagonal matrix Λ = diag{λ0 , λ1 , . . . , λT −1 }. Then,
the criterion for ﬁnding the vector is to minimise
L = (y − ξ ) (y − ξ ) + ξ QΛQ ξ . (44) The ﬁrst term in this expression penalises departures of the resulting curve
from the data, whereas the second term imposes a penalty for a lack of smoothness
in the curve. The second term comprises d = Q ξ , which is the vector of the pth
order diﬀerences of ξ . The matrix Λ serves to generalise the overall measure of the
curvature of the function that has the elements of ξ as its sampled ordinates, and
it serves to regulate the penalty for roughness, which may vary over the sample.
16 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 13
12
11
10
1880 1900 1920 1940 1960 1980 2000 Figure 11. The logarithms of annual U.K. real GDP from 1873 to 2001 with an interpolated trend. The trend is estimated via a ﬁlter with a variable smoothing parameter. Diﬀerentiating L with respect to ξ and setting the result to zero, in accordance
with the ﬁrstorder conditions for a minimum, gives
y − x = QΛQ x = QΛd. (45) Multiplying the equation by Q gives Q (y − x) = Q y − d = Q QΛd, whence
Λd = (Λ−1 + Q Q)−1 Q y . Putting this into the equation x = y − QΛd gives
x = y − Q(Λ−1 + Q Q)−1 Q y
= y − QΛ(I + ΛQ Q)−1 Q y . (46) This ﬁlter has been implemented in the program under the guise of a variable
smoothing procedure. By giving a high value to the smoothing parameter, a stiﬀ
curve can be generated, which approaches a straight line as λ → ∞. On the other
hand, structural breaks can be accommodated by greatly reducing the value of the
smoothing parameter in their neighbourhood. When λ → 0, the ﬁlter tends to
transmit the unaltered data values.
Figure 11 shown an example of the use of this ﬁlter. There were brief disruptions to the steady upwards progress of GDP in the U.K. after the two world
wars. These breaks have been absorbed into the trend by reducing the value of the
smoothing parameter in their localities. By contrast, the break that is evident in
the data following the year 1929 has not been accommodated in the trend.
A SeasonalAdjustment Filter
The need for initial conditions cannot be circumvented in cases where the
seasonal adjustment ﬁlter is applied to trended sequences. Consider the ﬁlter that
is applied to the diﬀerenced data g = Q y to produce a seasonallyadjusted sequence
q . Then, there is
(47)
q = QS (QS QS + λ−1 QR QR )−1 QS g,
17 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
where QR and QS are the matrix counterparts of the polynomial operators R(z )
and S (z ) of (18) and (19) respectively. The seasonally adjusted version of the
original trended data will be obtained by reinﬂating the ﬁltered sequence q via the
equation
(48)
j = S∗ q∗ + Sq,
where
q∗ = (S∗ S∗ )−1 S∗ (y − Sq ) (49) is the value that minimises the function
(y − j ) (y − j ) = (y − S∗ q∗ + Sq ) (S∗ q∗ + Sq ). (50) 5. The FrequencyDomain Filters
Often, in the analysis economic data, we would proﬁt from the availability of a
sharp ﬁlter, with a rapid transition between the stop band and the pass band that
is capable of separating components of the data that lie in closely adjacent frequency
bands.
An example of the need for such a ﬁlter is provided by a monthly data sequence
with an annual seasonal pattern superimposed on a trend–cycle trajectory. The
fundamental seasonal frequency is of π/6 radians or 30 degrees per month, whereas
the highest frequency of the trend–cycle component is liable to exceed π/9 radians
or 20 degrees. This leaves a narrow frequency interval in which a ﬁlter that is
intended to separate the trend–cycle component from the remaining elements must
make the transition from its pass band to its stop band.
To achieve such a sharp transition, a FIR or movingaverage ﬁlter requires
numerous coeﬃcients covering a wide temporal span. Such ﬁlters are inappropriate
to the short data sequences that are typical of econometric analyses. Rational ﬁlters
or feedback ﬁlters, as we have described them, are capable of somewhat sharper
transitions, but they also have their limitations.
When a sharp transition is achieved by virtue of a rational ﬁlter with relatively
many coeﬃcients, the ﬁlter tends to be unstable on account of the proximity of some
its poles to the circumference of the unit circle. (See Figure 7 for an example.) Such
ﬁlters can be excessively inﬂuenced by noise contamination in the data and by the
enduring eﬀects of illchosen initial conditions.
A more eﬀective way of achieving a sharp cutoﬀ is to conduct the ﬁltering
operations in the frequency domain. Reference to equation (1) shows that an ideal
ﬁlter can be obtained by replacing with zeros the Fourier coeﬃcients that are associated with frequencies that fall within the stop band.
Complex Exponentials and the Fourier Transform
18 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
The Fourier coeﬃcients are determined by regressing the data on the trigonometrical functions of the Fourier frequencies according to the following formulae:
αj = 2
T yt cos ωj t, and βj = t 2
T yt sin ωj t. (51) t ¯
Also, there is α0 = T −1 t yt = y , and, in the case where T = 2n is an even
number, there is αn = T −1 t (−1)t yt .
It is more convenient to work with complex Fourier coeﬃcients and with complex exponential functions in place sines and cosines. Therefore, we deﬁne
ζj = αj − iβj
.
2 (52) Since cos(ωj t) − sin(ωj t) = e−iωj t , it follows that the complex Fourier transform
and its inverse are given by
1
ζj =
T T −1 −iωj t yt e T −1 ←→ yt = dt t=0 ζj eiωj t , (53) j =0 ∗
where ζT −j = ζj = (αj + βj )/T . For a matrix representation of these transforms,
one may deﬁne U = T −1/2 [exp{−i2πtj/T }; t, j = 0, . . . , T − 1],
¯
U = T −1/2 [exp{i2πtj/T }; t, j = 0, . . . , T − 1], (54) ¯
¯
which are unitary complex matrices such that U U = U U = IT . Then,
ζ = T −1/2 U y ←→ ¯
y = T 1/2 U ζ, (55) where y = [y0 , y1 , . . . yT −1 ] and ζ = [ζ0 , ζ1 , . . . ζT −1 ] are the vectors of the data
and of their spectral ordinates, respectively.
This notation can be used to advantage for representing the process of applying
an ideal frequencyselective ﬁlter. Let J be a diagonal selection matrix of order T
of zeros and units, wherein the units correspond to the frequencies of the pass band
and the zeros to those of the stop band. Then, the selected Fourier ordinates are
the nonzero elements of the vector Jζ . By an application of the inverse Fourier
transform, the selected elements are carried back to the time domain to form the
ﬁltered sequence. Thus, there is
¯
x = U JU y = Ψy. (56) ◦
¯
Here, U JU = Ψ = [ψi−j  ; i, j = 0, . . . , T − 1] is a circulant matrix of the ﬁlter coefﬁcients that would result from wrapping the inﬁnite sequence of the ideal bandpass 19 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 0.15
0.1
0.05
0
−0.05
−0.1
0 50 100 150 Figure 12. The residual sequence from ﬁtting a linear trend to the logarithmic
consumption data with an interpolated line representing the business cycle. coeﬃcients around a circle of circumference T and adding the overlying elements.
Thus
◦
ψk ∞ = ψqT +k . (57) q =−∞ Applying the wrapped ﬁlter to the ﬁnite data sequence via a circular convolution is equivalent to applying the original ﬁlter to an inﬁnite periodic extension of
the data sequence. In practice, the wrapped coeﬃcients of the timedomain ﬁlter
matrix Ψ would be obtained from the Fourier transform of the vector of the diagonal elements of the matrix J . However, it is more eﬃcient to perform the ﬁltering
by operating upon the Fourier ordinates in the frequency domain, which is how the
program operates.
The method of frequencydomain ﬁltering can be used to mimic the eﬀects of
any lineartime invariant ﬁlter, operating in the time domain, that has a welldeﬁned
frequencyresponse function. All that is required is to replace the selection matrix
J of equation (59) by a diagonal matrix containing the ordinates of the desired
frequency response, sampled at points corresponding to the Fourier frequencies.
In the case of the Wiener–Kolmogorov ﬁlters, deﬁned by equation (24) and
(25), one can consider replacing the dispersion matrices Ωξ and Ωη by their circular
counterparts
¯
¯
and
Ω◦ = U Λη U.
(58)
Ω◦ = U Λ ξ U
ξ
η
Here, Λξ and Λη are diagonal matrices containing ordinates sampled from the spectral density functions of the respective processes. The resulting equations for the
ﬁltered sequences are
¯
¯
x = Ω◦ (Ω◦ + Ω◦ )−1 y = U Λξ (Λξ + Λη )−1 U y = U Jξ U y
ξ
ξ
η
and (59) ¯
¯
h = Ω◦ (Ω◦ + Ω◦ )−1 y = U Λη (Λξ + Λη )−1 U y = U Jη U y.
η
ξ
η (60) 20 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
An example of the application of the lowpass frequencydomain ﬁlter is provided by Figure 12. Here, a ﬁlter with a precise cutoﬀ frequency of π/8 radians
has been applied to the residuals from the linear detrending of the logarithms of
the U.K. consumption data.
The appropriate cutoﬀ frequency for this ﬁlter has been indicated by the periodogram of Figure 10. The smooth curve that has been interpolated through these
residuals has been constituted from the Fourier ordinates in the interval [0, π/8].
The same residual sequence has also been subjected to the approximate bandpass ﬁlter of Christiano and Fitzgerald (2003) to generate the estimate business
cycle of Figure 4. This estimate fails to capture some of the salient lowfrequency
ﬂuctuations of the data.
The highlighted region Figure 10 also show the extent of the pass band of the
bandpass ﬁlter; and it appears that the lowfrequency structure of the data falls
mainly below this band. The fact that, nevertheless, the ﬁlter of Christiano and
Fitzgerald does reﬂect a small proportion of the lowfrequency ﬂuctuations is due
to its substantial leakage over the interval [0, π/16], which falls within its nominal
stop band.
Extrapolations and Detrending
To apply the frequencydomain ﬁltering methods, the data must be free of
trend. This can be achieved either by diﬀerencing the data or by applying the
ﬁlter to data that are residuals from ﬁtting a polynomial trend. The program has
a facility for ﬁtting a polynomial time trend of a degree not exceeding 15. To avoid
the problems of collinearity that arise in ﬁtting ordinary polynomials speciﬁed in
terms of the powers of the temporal index t, a ﬂexible generalised leastsquares
procedure is provided that depends upon a system of orthogonal polynomials.
In applying the methods, it is also important to ensure that there are no
signiﬁcant disjunctions in the periodic extension of the data at the points where
the end of one replication of the sample sequence joins the beginning of the next
replication. Equivalently, there must be a smooth transition between the start and
ﬁnish points when the sequence of T data points is wrapped around a circle of
circumference T .
The conventional means of avoiding such disjunctions is to taper the meanadjusted, detrended data sequence so that both ends decay to zero. (See Bloomﬁeld
1976, for example.) The disadvantage of this recourse is that it falsiﬁes the data
at the ends of the sequence, which is particularly inconvenient if, as is often the
case in economics, attention is focussed on the most recent data. To avoid this
diﬃculty, the tapering can be applied to some extrapolations, which can be added
to the data, either before or after it has been detrended.
In the ﬁrst case, a polynomial is tted to the data; and tapered versions of the
residual sequence that have been reﬂected around the endpoints of the sample are
added to the extrapolated branches of the polynomial. Alternatively, if the data
show strong seasonal ﬂuctuations, then a tapered sequence based on successive
21 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 11.5
11
10.5
10
0 50 100 150 Figure 13. The trend/cycle component of U.K. Consumption determined by
the frequencydomain method, superimposed on the logarithmic data. repetitions of the ultimate seasonal cycle is added to the upper branch, and a
similar sequence based on the ﬁrst cycle is added to the lower branch.
In the second case, where the data have already been detrended, by the subtraction of a polynomial trend or by the application of the diﬀerencing operator,
the extrapolations will be added to the horizontal axis.
This method of extrapolation will prevent the end of the sample from being
joined directly to its beginning. When the data are supplemented by extrapolations,
the circularity of the ﬁlter will eﬀect only the furthest points the extrapolations,
and the extrapolations will usually be discarded after the ﬁltering has taken place.
However, in many cases, extrapolations and their associated tapering will prove to
be unnecessary. A case in point is provided by the ﬁltering of the residual sequence
of the logarithmic consumption data that is illustrated by Figure 12.
AntiDiﬀerencing
After a diﬀerenced data sequence has been ﬁltered, it will be required to reverse
the eﬀects of the diﬀerencing via a process of reinﬂation. The process can be
conducted in the time domain in the manner that has been indicated in section 4,
where expressions have been derived for the initial conditions that must accompany
the summation operations.
However, if the ﬁltered sequence is the product of a highpass ﬁlter and if
the original data have been subjected to a twofold diﬀerencing operation, then an
alternative method of reinﬂation is available that operates in the frequency domain.
This method is used in the program only if the ﬁltering itself has taken place in the
frequency domain.
In that case, the reduction to stationarity will be by virtue of a centralised
twofold diﬀerencing operator of the form
(1 − z −1 )(1 − z ) = −z ∇2 (z )
22 (61) D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
The frequencyresponse function of the operator, which is obtained by setting z =
exp{−iω } in this equation, is
f (ω ) = 2 − 2 cos(ω ). (62) The frequency response of the antidiﬀerencing operator is v (ω ) = 1/f (ω ).
The matrix version of the centralised operator can be illustrated by the case
where T = 5:
⎡ ⎤ ⎡ −2 ⎢
⎢1
⎢
⎥
⎢
N5 = ⎣ −Q ⎦ = − ⎢ 0
⎢
⎣0
n4
0
n0 1 0 0 0 ⎤ −2
1
0 1
−2
1 0
1
−2 0
0
1 ⎥
⎥
⎥
⎥.
⎥
⎦ 0 0 1 −2 (63) In applying this operator to the data, the ﬁrst and the last elements of NT y ,
which are denoted by n0 y and nT −1 y , respectively, are not true diﬀerences. Therefore, they are discarded to leave −Q y = [q1 , . . . , qT −2 ] . To compensate for this
loss, appropriate values are attributed to q0 and qT −1 , which are formed from
combinations of the adjacent values, to create a vector of order T denoted by
q = [q0 , q1 , . . . , qT −2 , qT −1 ] .
The highpass ﬁltering of the data comprises the following steps. First, the vector q is translated to the frequency domain to give γ = U q . Then, the frequencyresponse matrix Jη is applied to the resulting Fourier ordinates. Next, in order to
compensate for the eﬀects of diﬀerencing, the vector of Fourier ordinates is premultiplied by a diagonal matrix V = diag{v0 , v1 , . . . , vT −1 }, wherein vj = 1/f (ωj ); j =
0, . . . , T − 1, with ωj = 2πj/T . Finally, the result is translated back to the time
domain to create the vector h.
The vector of the complementary component is x = y − h. Thus there are
¯
h = U Hη U q and ¯
x = y − U Hη U q, (64) where Hη = V Jη . It should be noted that the technique of reinﬂating the data
within the frequency domain cannot be applied in the case of a lowpass component for the reason that f (0) = 0 and, therefore, the function v (ω ) = 1/f (ω ) is
unbounded at the zero frequency ω = 0. However, as the above equations indicate,
this is no impediment to the estimation of the corresponding component x.
An example of the application of these procedures is provided by Figure 13,
which concerns the familiar logarithmic consumption data, through which a smooth
trendcycle function has been interpolated. This is indistinguishable from the function that is obtained by adding the smooth businesscycle of Figure 12 to the linear
trend that was subtracted from the data in the process of detrending it. The
program also allows the trendcycle function to be constructed in this manner.
23 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM 11.5
11.25
11
10.75
10.5
10.25
10
0 50 100 150 Figure 14. The plot of a seasonally adjusted version of the consumption data
of Figures 2 and 13, obtained via the time domain ﬁlter 0.04
0.02
0
−0.02
−0.04
−0.06
0 50 100 150 Figure 15. The seasonal component extracted from the U.K. consumption
data by a timedomain ﬁlter. 0.06
0.04
0.02
0
−0.02
−0.04
−0.06
0 50 100 150 Figure 16. The seasonal component extracted from the U.K. consumption
data by a frequencydomain ﬁlter. 24 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
Seasonal Adjustment in the Frequency Domain
The method of frequencydomain ﬁltering is particularly eﬀective in connection
with the seasonal adjustment of monthly or quarterly data. It enables one to remove
elements not only at the seasonal frequencies but also at adjacent frequencies by
allowing one to deﬁne a neighbourhood for each of the stop bands surrounding the
fundamental seasonal frequency and its harmonics.
If only the fundamental seasonal element and its harmonics are entailed in its
synthesis, then the estimated seasonal component will be invariant from year to
year. If elements at the adjacent frequencies are also present in the synthesis, then
it will evolve gradually over the length of the sample period.
The eﬀects of the seasonaladjustment ﬁlters of the program are illustrated in
Figures 14–16. Figure 14 shows the seasonally adjusted version of the logarithmic
consumption data that has been obtained via the Wiener–Kolmogorov ﬁlter of
section 4. Figure 15 shows the seasonal component that has been extracted in the
process.
The regularity of this component is, to some extent, the product of the ﬁlter.
Figure 16 shows a less regular seasonal component that has been extracted by the
frequencydomain ﬁlter described in the present section. This component has been
synthesised from elements at the Fourier frequencies and from those adjacent to
them that have some prominence if the periodogram of Figure 10.
6. The Program and its Code
The code of the program that has been described in this paper is freely available at
the web address that has been given. This code is in Pascal. A parallel code in C has
been generated with the help of a PascaltoC translator, which has been written
by the author. The aim has been to make the program platformindependent and
to enable parts of it to be realised in other environments.
This objective has dictated some of the features of the user interface of the
program, which, in its present form, eschews such devices as pulldown menus and
dialogue boxes etc. Subsequent versions of the program will make limited use of
such enhancements.
However, the nostrum that a modern computer program should have a modeless interface will be resisted. Whereas such an interface is necessary for programs
such as word processors, where all of the functions should be accessible at all times,
it is less appropriate to statistical programs where, in most circumstances, the user
will face a restricted set of options. Indeed, the present program is designed to
restrict the options, at each stage of the operations, to those that are relevant.
A consequence of this design is that there is no need of a manual of instructions
to accompany the program. Instead, the three log ﬁles that record the steps taken
in ﬁltering some typical data sequences should provide enough help to get the user
underway. What is more important is that the user should understand the nature
of the statistical procedures that have been implemented; and this has been the
purpose of the present paper.
25 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
References
Baxter, M., and R.G. King, (1999). Measuring Business Cycles: Approximate
BandPass Filters for Economic Time Series. Review of Economics and Statistics,
81, 575–593.
Bloomﬁeld, P., (1976). Fourier Analysis of Time Series: An Introduction. John
Wiley and Sons, New York.
Butterworth, S., (1930). On the Theory of Filter Ampliﬁers. The Wireless Engineer
(From 1923 to 1930, the journal was called Experimental Wireless and the Radio
Engineer), 7, 536–541.
Christiano, L.J. and T.J. Fitzgerald, (2003). The Bandpass Filter. International
Economic Review, 44, 435–465.
Hodrick, R.J., and E.C. Prescott, (1980). Postwar U.S. Business Cycles: An
Empirical Investigation, Working Paper, Carnegie–Mellon University, Pittsburgh,
Pennsylvania.
Hodrick, R.J., and E.C. Prescott, (1997). Postwar U.S. Business Cycles: An Empirical Investigation. Journal of Money, Credit and Banking, 29, 1–16.
Ladiray, D., and B. Quenneville, (2001). Seasonal Adjustment with the X11
Method, Springer Lecture Notes in Statistics 158, Springer Verlag, Berlin.
Baxter, M., and R.G. King, (1999). Measuring Business Cycles: Approximate
BandPass Filters for Economic Time Series. Review of Economics and Statistics,
81, 575–593.
Henderson, R., (1916). Note on Graduation by Adjusted Average. Transactions of
the Actuarial Society of America, 17, 43–48.
Henderson, R., (1924). A New Method of Graduation. Transactions of the Actuarial Society of America, 25, 29–40.
Leser, C.E.V. (1961). A Simple Method of Trend Construction. Journal of the
Royal Statistical Society, Series B, 23, 91–107.
Musgrave, J. (1964). A Set of End Weights to End all End Weights, Working
Paper, US Bureau of the Census, Washington
Pollock, D.S.G., (2000). Trend Estimation and DeTrending via Rational Square
Wave Filters. Journal of Econometrics, 99, 317–334.
Pollock, D.S.G., (2007). Wiener–Kolmogorov Filtering, FrequencySelective Filtering and Polynomial Regression. Econometric Theory, 23, 71–83.
Pollock, D.S.G., (2008). Investigating Economic Trends and Cycles, in Palgrave
Handbook of Econometrics: Vol. 2 Applied Econometrics, T.C. Mills and K. Patterson (editors). Palgrave Macmillan Ltd, Houndmills, Basingstoke.
26 D.S.G. POLLOCK: IDEOLOG—A FILTERING PROGRAM
Quenneville, B., D. Ladiray and B. Lefranc, (2003). A Note on Musgrave Asymmetrical Trendcycle Filters. International Journal of Forecasting, 19, 727–734.
Whittle, P., (1983). Prediction and Regulation by Linear LeastSquare Methods,
Second Edition, Basil Blackwell, Oxford. 27 ...
View
Full Document
 Spring '12
 D.S.G.Pollock
 Fourier Series, IDEOLOG—A FILTERING PROGRAM

Click to edit the document details