280 Investigating Economic Trends and Cycles
A more general method of curve fitting, which embeds polynomial regression
as a special case, is one that involves the minimization of a combination of two
sums of squares. Letxdenote the vector of fitted values, which is a sequence of
the ordinates of points, equally spaced in time, through which a continuous curve
might be interpolated. The criterion for finding the vector is to minimize:
L=(y−x)′−^1 (y−x)+x′Q−^1 Q′x. (6.121)
The first term penalizes 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 comprisesd=Q′x, which is the vector ofpth-order differences
ofx. The matrix−^1 serves to generalize the overall measure of the curvature of
the function that has the elements ofxas its sampled ordinates, and it serves to
regulate the penalty, which may vary over the sample.
DifferentiatingLwith respect toxand setting the result to zero, in accordance
with the first-order conditions for a minimum, gives:
−^1 (y−x)=Q−^1 Q′x
=Q−^1 d.
(6.122)
Multiplying the equation byQ′givesQ′(y−x)=Q′y−d=Q′Q−^1 d, whence
−^1 d=(+Q′Q)−^1 Q′y. Putting this into the equationx=y−Q−^1 dgives:
x=y−Q(+Q′Q)−^1 Q′y. (6.123)
By setting=λ−^1 Iand=Iand lettingQ′denote the second-order difference
operator, the HP filter is obtained in the form of:
x=y−Q(λ−^1 I+Q′Q)−^1 Q′y. (6.124)
This form is closely related to that of the infinite-sample filterβ(z)= 1 −βc(z)which
invokes equation (6.95). In the finite-sample version of the filter, the submatrixQ′
of∇^2 T=(I−LT)^2 replaces the difference operator( 1 −z)^2 , andQreplaces( 1 −z−^1 )^2.
If=0 in (6.123), and ifQ′is the matrix version of the second-difference
operator, then the generalized least squares interpolator of a linear function is
derived, which is subsumed under (6.120).
6.7.2 Finite-sample WK filters
To provide a statistical interpretation of the formula of (6.123), consider a data
sequencey=ξ+η, whereξ=φ+ζis a trend component, which is the sum
of a vectorφ, containing the ordinates of a polynomial of degreepat most, and
of a vectorζfrom a stochastic process withpunit roots that is driven by a zero-
mean forcing function. The termηstands for a vector sampled from a mean-zero
stationary stochastic process which is independent of the process drivingξsuch
that:
E(η)=0, D(η)= and C(η,ξ)=0. (6.125)