feds · November 30, 2007

Continuous Time Extraction of a Nonstationary Signal with Illustrations in Continuous Low-pass and Band-pass Filtering

Abstract

This paper sets out the theoretical foundations for continuous-time signal extraction in econometrics. Continuous-time modeling gives an effective strategy for treating stock and flow data, irregularly spaced data, and changing frequency of observation. We rigorously derive the optimal continuous-lag filter when the signal component is nonstationary, and provide several illustrations, including a new class of continuous-lag Butterworth filters for trend and cycle estimation.

Finance and Economics Discussion Series Divisions of Research & Statistics and Monetary Affairs Federal Reserve Board, Washington, D.C. Continuous Time Extraction of a Nonstationary Signal with Illustrations in Continuous Low-pass and Band-pass Filtering Tucker S. McElroy and Thomas M. Trimbur 2007-68 NOTE: Staff working papers in the Finance and Economics Discussion Series (FEDS) are preliminary materials circulated to stimulate discussion and critical comment. The analysis and conclusions set forth are those of the authors and do not indicate concurrence by other members of the research staff or the Board of Governors. References in publications to the Finance and Economics Discussion Series (other than acknowledgement) should be cleared with the author(s) to protect the tentative character of these papers.

Continuous Time Extraction of a Nonstationary Signal with Illustrations in Continuous Low-pass and Band-pass Filtering Tucker S. McElroy, U.S. Census Bureau, Washington DC Thomas M. Trimbur, Federal Reserve Board, Washington DC ∗ Abstract This paper sets out the theoretical foundations for continuous-time signal extractionineconometrics. Continuous-timemodelinggivesaneffectivestrategy for treating stock and flow data, irregularly spaced data, and changing frequency of observation. We rigorously derive the optimal continuous-lag filter whenthesignalcomponentisnonstationary, andprovide severalillustrations, includinganew classofcontinuous-lagButterworth filters fortrend and cycle estimation. Keywords: Continuous Time Processes, Cycles, Hodrick-Prescott Filter, Linear Filtering, Signal Extraction, Turning points Disclaimer: This report is released to inform interested parties of research and to encourage discussion. The views expressed on statistical issues are those of the authorsandnotnecessarilythoseoftheU.S.CensusBureauoroftheFederalReserve Board. Corresponding author. Address: Division of Research and Statistics; 20th and C Street, NW; ∗ Federal Reserve Board; Washington, DC 20551. Email: Thomas.M.Trimbur@frb.gov. 1

1 Introduction This paper concentrates on signal extraction in continuous-time. The goal is to set the stage for the development of coherent discrete filters in various applications. Thus, westartbysettingupafundamentalsignalextractionproblemandbyinvestigatingthepropertiesoftheoptimalcontinuous-lag filters.Thispartofthefrequency and time domain analysis is done independently of sampling type and interval and so may be seen as fundamental to the dynamics of the problem. A key result of the paper is a proof of the signal extraction formula for nonstationary models; this is crucial for many applications in economics. In discrete-time, methods for nonstationary series rely on theoretical foundations, as set out in Bell (1984). In continuous-time, Whittle (1983) sketches an argument for stationary models; a satisfactory proof of the signal extraction formula in this case is provided by Kailath, Sayed, and Hassibi (2000). Whittle (1983) also provides results for the nonstationary case, but omits proof, and in particular, fails to consider the initial value assumptions that are central to the problem. In this paper, we extend the proof to the case of a nonstationary signal, that is, integrated of order d, where d > 0 is an integer. We also treat the case of a whitenoiseirregular,whichisfrequentlyusedinstandardmodelsincontinuous-time econometrics. Since continuous-time white noise is essentially the first derivative of Brownian motion (which is nowhere differential), this requires a careful mathematical treatment to ensure that the signal extraction problem is well-defined. A second result is the development of a class of continuous-lag Butterworth filters for economic data. In particular, we introduce low-pass and band-pass filters in continuous-time that are analogous to the filters derived by Harvey and Trimbur (2003) for the corresponding discrete-time models, and their properties are illustrated through plots of the continuous-time gain functions. One special case of interest is the derivation of a continuous-lag filter from the smooth trend model; this gives a continuous-time extension of the popular Hodrick-Prescott (HP) filter (Hodrick and Prescott, 1997). At the root of the model-based band-pass is a class of higher order cycles in continuous-time. This class generalizes the stochastic differential equation (SDE) model for a stochastic cycle developed in Harvey (1989) 2

and Harvey and Stock (1993). The study of business cycles has remained of interest to researchers and policymakers for some time. Some of the early work in continuous-time econometrics was geared toward this application; Kalecki (1935) and James and Belz (1936) used a model in the form of a differential-difference equation (DDE) to describe business cycle movements. The DDE form gives an alternative to the SDE form that is of some theoretical interest; see Chambers and McGarry (2002). Its usefulness for methodology seems, however, limited since the DDE admits no convenient representation in either the time or frequency domain. The SDE form, in contrast, has an intuitive structure. In introducing the class of higher order models, we derive analytical expressions for the spectral density; this gives a clear summary of the cyclical properties of the model. Ourformulationremainsgeneralsothat,forinstance,itincludestheContinuous- Time Autoregressive Integrated Moving Average (CARIMA) processes of Brockwell and Marquardt (2005). These follow the SDE form and so can be handled analytically. Throughout the paper, examples are given to help explain the methodology. In focussing on continuous-time foundations in this paper, we also note the clear practical motivations for this strategy. A continuous-time approach gives flexibility in a number of directions: in the treatment of stock and flowvariables in economics, in working with missing data and with irregularly spaced data, and in handling a generalfrequencyofobservation. Thislastpointisimmediatelypractical; evenwhen considering just a single economic variable, with different sampling frequencies (for instance, quarterly and annual), to preserve consistency in discrete trend estimates requires a unified basis for filter design. See Bergstrom (1988, 1990) for further discussions of the advantages of continuous-time analysis. The practical application of the continuous-time strategy is sketched at the end of this paper, and is set out in greater detail in a companion paper (McElroy and Trimbur, 2007); therein we examine how the optimal continuous-lag filter may be discretized to yield expressions for the discrete-time weights appropriate for data sampled under various conditions. The method is illustrated with a number of examples, including the continuous-time HP filter. In recent work, Ravn and Uhlig (2002), Maravall and del Rio (2001), and Harvey and Trimbur (2007) have investi- 3

gated how to adapt the HP filter to monthly and annual series, given that the filter was originally designed for quarterly US GDP. We show how the continuous-time analogue of the HP filter is discretized to yield a set of consistent discrete filters, thereby solving the problem of adapting the filter. Most previous methods rely on the discretization of the underlying continuoustime model, so that the analysis is done in discrete-time. Our approach instead uses the continuous-time formulation of filtering more directly. Thus, the method centers on the use of the underlying continuous-lag filters, on their properties, and on the transformations needed for discrete datasets. The theoretical results derived here set the foundation for broader applications. For instance, a new class of low-pass and band-pass filters are presented in Section 4 of this paper. Further, in considering the signal extraction problem in continuoustime, we derive filters to measure velocity and acceleration of a time series, which could be useful for the analysis of turning points. The rest of the paper is organized as follows. Section 2 reviews continuous-time filtering, based on material from Priestley (1981), Hannan (1970), and Koopmans (1974). Section3setsoutthesignalextractionframework. Insection4,examplesare given for economic series; an extension of the standard HP filter is derived from the smoothtrendmodel, andageneralclassofband-passfiltersispresented. Extensions to methodology are then described, specifically, the conversion of continuous-lag filters to estimate growth rates and other characteristics of an underlying component. Section 5 discusses the application of the method to real series, and Section 6 concludes. Proofs are given in the Appendix. 2 Continuous-Time Processes and Filters This section sets out the theoretical framework for the analysis of continuous-time signal processing and filtering. Much of the treatment follows Hannan (1970); also see Priestley (1981) and Koopmans (1974). Let y(t) for t R, the set of real ∈ numbers, denote a real-valued time series that is measurable and square-integrable at each time. The process is weakly stationary by definition if it has constant mean 4

— set to zero for simplicity — and autocovariance function R given by y R y (h) = E[y(t)y(t+h)] h R. (1) ∈ Note that the autocovariances are defined for the continuous range of lags h. Thus if y(t) is a Gaussian process, R completely describes the dynamics of the stochasy tic process. A convenient model for stationary continuous-time processes that is analogous to moving averages in discrete time series is given by ∞ y(t) = (ψ (cid:18))(t) = ψ(x)(cid:18)(t x)dx (2) ∗ − Z −∞ where ψ( ) is square integrable on R, and (cid:18)(t) is continuous-time white noise (WN). · In this case, R (h) = (ψ ψ )(h), where ψ (x) = ψ( x). If y(t) is Gaussian, y − − ∗ − then (cid:18)(t) = dW(t)/dt, the derivative of a standard Wiener process. Though W(t) is nowhere differentiable, (cid:18)(t) can be defined using the theory of Generalized Random Processes, as in Hannan (1970, p. 23). It is convenient to work with models expressed in terms of the disturbance (cid:18)(t), because this makes it easy to see the connection with discrete models based on white noise disturbances. As an example, Brockwell’s (2001) Continuous-time Autoregressive Moving Average (CARMA) models can be written as a(D)y(t) = b(D)(cid:18)(t) where a(z) is a polynomial of order p, and b(z) is a polynomial of order q < p, and D is the derivative operator. The condition for stationarity is analogous to the one for a discrete AR polynomial: the roots of the equation a(z) = 0 must all have strictly negative real part. It can be shown (Brockwell and Marquardt, 2005) that y(t) following such a stationary CARMA model can be re-expressed in the form (2), for an appropriate ψ. Next, we define the continuous-time lag operator L via the equation Lxy(t) = y(t x) (3) − for any x R and for all times t R. We denote the identity element L0 by 1, ∈ ∈ just as in discrete time. Then a Continuous-Lag Filter is an operator Ψ(L) with 5

associated weighting kernel ψ (an integrable function) such that Ψ(L) = ∞ ψ(x)Lxdx (4) Z −∞ The effect of the filter on a process y(t) is ∞ Ψ(L)y(t) = ψ(x)y(t x)dx = (ψ y)(t) (5) − ∗ Z −∞ The requirement of integrability for the function ψ(x) is a mild condition that is sufficient formany problems. However, whentheinput processis nonintegrableover t, an integrable ψ(x) may become inadmissible as a kernel, i.e., it may fail to give a well-defined process as output. In such a case, we may need to assume that ψ is differentiable to a specified order, with integrable or square integrable derivatives. This development parallels the discussion in Priestley (1981), where the filter is written as [ψ](D) = ∞ ψ(x)e Dxdx, − L Z −∞ with [ψ] denoting the Laplace transform of ψ. As will be discussed below, we can L make the identification D = logL, which effectively maps Priestley’s formulation − into (4). 2.1 Continuous-lag filters in the Frequency Domain In analogy with the discrete-time case, the frequency response function is obtained by replacing L by the argument e iλ: − Ψ(e − iλ) = ∞ ψ(x)e − iλxdx, λ R (6) ∈ Z −∞ Denotingthecontinuous-timeFourierTransformby [ ],equation(6)canbewritten F · as Ψ(e iλ) = [ψ](λ). − F Example 1 Consider a Gaussian kernel ψ(x) = 1 e x2 . In this example, the √2π − 2 inclusion of the normalizing constant means that the function integrates to one; since applying the filter tends to preserve the level of the process, it could be used 6

as a simple trend estimator. The frequency response has the same form as the weighting kernel and is given by [ψ](λ) = e λ2 . − 2 F The power spectrum of a continuous time process y(t) is the Fourier Transform of its autocovariance function R : y f y (λ) = [R y ](λ), λ R (7) F ∈ ThegainfunctionofafilterΨ(L)isthemagnitudeofthefrequencyresponse,namely G(λ) = [ψ](λ) , λ R (8) |F | ∈ As in discrete time series signal processing, passing an input (stationary) process throughthe filterΨ(L) results inan output process with spectrummultipliedby the squared gain; so the gain function gives information about how contributions to the varianceatvariousfrequenciesareattenuatedoraccentuatedbythefilter. Notethat incontrast tothediscrete case wherethedomainisrestrictedtotheinterval[ π,π], − the functions in (7) and (8) are defined over the entire real line. Given a candidate gain function g(λ), taking the inverse Fourier Transform in continuous-time yields the associated weighting kernel: 1 − 1[g](x) = ∞ g(λ)eiλxdx, x R (9) F 2π ∈ Z −∞ This expression is well-defined for any integrable g(λ). Integrability is a mild condition satisfied by nearly all filters of practical interest. Example 2 Weighting kernels that decay exponentially on either side of the observation point have often been applied in smoothing trends; this pattern arises frequently in discrete model-based frameworks, e.g., Harvey and Trimbur (2003). Similarly, in the continuous time setting, a simple example of a trend estimator is thedoubleexponential weightingpattern ψ(x) = 1 2 e −| x | , x ∈ R. Inthiscase, onecan show using integral calculus that Ψ(L) = 1/(1 (logL)2), as a formal expression. − The Fourier transform has the same form as a Cauchy probability density function, namely [ψ](λ) = 1/(1+λ2). This means that the gain of the low-pass filter Ψ(L) F decays slowly as λ . −→ ∞ 7

2.2 The Derivative Filter and Nonstationary Processes In (3), the extension of the lag operator L to the continuous-time framework is made explicit. In building models, we can treat L as an algebraic quantity as in the discrete-time framework. The extension of the differencing operator, ∆ = 1 L, − used to define nonstationary models, is discussed in Hannan (1970, p. 55) and Koopmans (1974). To define the mean-square differentiation operator D, consider the limit of measuring the displacement of a continuous-time process, per unit of time, over an arbitrarily small interval δ: d y(t) y(t δ) 1 Lδ y(t) = lim − − = lim − y(t) = ( logL)y(t). dt δ 0 δ δ 0 δ − → → The limits are interpreted to converge in mean square. Thus, we see that taking the derivative d/dt has the same effect as applying the continuous lag filter logL. − This holds for all mean-sqaure differentiable processes y(t), implying D = logL; − note that Priestley (1981) derives the equivalent L = exp D via Taylor series {− } arguments. This operator D will be our main building block for nonstationary continuous-time processes. It will also be useful in thinking about rates of growth and rates of rates of growth — the velocity and acceleration of a process, respectively. We refer to logL as the derivative filter; taking powers yields higher order − derivative filters. For instance, (logL)2 gives a measure of acceleration with respect to time. We note that the frequency response of Dd is ( iλ)d. − Standard discrete-time ARIMA processes are written as difference equations, built on white noise disturbances. In analogy, continuous time processes can be written as differential equations, built on an extension of white noise to continuoustime. Thus a natural class of models is the Integrated Filtered Noise processes, which are given by Ddy(t) = Ψ(L)(cid:18)(t) (10) for some integrable ψ, and order of differential d 0. This class will be denoted ≥ y(t) ∼ IFN(d); it encompasses a wide variety of linear continuous-time models. As an example, Brockwell and Marquardt (2005) define the class of Continuous-time 8

Autoregressive Integrated Moving Average (CARIMA) models as the solution to a(D)Ddy(t) = b(D)(cid:18)(t). (11) Thus,applyingthederivativefilterdtimestransformsy(t)intoastationaryCARMA(p,q) process. The autoregressive order p is the degree of the polynomial a(D), and the moving average order q is the degree of the polynomial b(z). The constraint q < p is necessary to ensure the process is well-defined; this ensures that the spectral density of Ddy(t) is an integrable function. This gives the CARIMA(p,d,q) process. The original process y(t) is nonstationary and is said to be integrated of order d in the continuous-time sense. Now this can be put into an IFN(d) form: starting from (11), we can write (formally) Ddy(t) = [b(D)/a(D)](cid:18)(t) (12) UsingthedefinitionofD,itfollowsthaty(t) ∼ IFN(d)withΨ(L) = b( logL)/a( logL). − − Deriving the kernel ψ(x) requires an expression for the rational function in terms of an integral over powers of L, namely b( logL)/a( logL) = ∞ ψ(x)Lxdx. Using − − −∞ the formulation of Priestley (1981), we see that CARIMA models can be equiva- R lently expressedas IFN models wherethe kernel ψ’sLaplace transformis arational function. Example 3: Higher order stochastic cycles We consider a general class of continuous-time stochastic cycles. These are indexed by a positive integer n that denotes the order of the model. Denote the cyclical process by ψ (t), and let ψ (t) represent an auxiliary process n n∗ used in the construction of the model. Define ψ (t) = (ψ (t) ψ (t)). An n th n n n∗ 0 − order stochastic cycle in continuous-time is given by ψ (t) i 1 dψ (t)dt = Aψ (t)dt+ − dt, i = 2,...,n (13) i i " 0 # κ(t) dψ (t)dt = Aψ (t)dt+ dt, κ(t) WN 0,σ2 1 1 " 0 # ∼ κ ¡ ¢ 9

where ψ (t) = (ψ (t) ψ (t)), i = 1,...,n 1 represent additional auxiliary processes. i i i∗ 0 − The coefficient matrix in (13) is logρ λ c A = " λ c logρ # − The parameter ρ is called the damping factor; it satisfies 0 < ρ 1. The stochastic ≤ variation in the cycle per unit time depends on the continuous-time variance parameter σ2. The parameter ρ controls the persistence of cyclical fluctuations, and κ its specific role depends on n. Generally, for higher orders, the model generates smoother dynamics for the cycle. Since the parameter λ corresponds roughly to a peak in the spectrum, it indic cates a central frequency of the cycle, and 2π/λ is an average period of oscillation. c As λ is a frequency in continuous-time, it can be any positive real number, though c for macroeconomic data, business cycle theory will usually suggest a value in some intermediate range. To construct a Gaussian cyclical process, the increment κ(t) can be derived from Brownian motion W (t), that is, κ(t) DW (t). κ κ ∼ In analyzing cyclical behavior, it is natural to consider the frequency domain properties. Toderivethespectraforvariousn, start byrewriting(13) asarecursive formula: D logρ λ ψ (t) ψ (t) c i i 1 − − = − , i = 1,...,n " λ c D − logρ #" ψ i∗ (t) # " 0 # with the initialization ψ (t) = κ(t). The solution is 0 ((D logρ)2 +λ2)nψ (t) = (D logρ)nκ(t) − c n − so that the nth order cycle has a CARMA(2n,n) form. The power spectrum is n λ2 +log2ρ γ (λ) = σ2 (14) ψn κ log2ρ+(λ λ )2 log2ρ+(λ+λ )2 " c c # − One advantage of workin¡g with the cycle in¢¡continuous-time is¢the possibility of analyzing turning points instantaneously. The expected incremental change in the 10

cycle for n 2 is ≥ dψ (t) = (logρ)ψ (t)dt+λ ψ (t)dt+ψ (t)dt (15) n n c n∗ n 1 − For n = 1, this reduces to dψ (t) = (logρ)ψ (t)dt+λ ψ (t)dt (16) 1 1 c 1∗ Based on the smoothness of estimated cycles, the higher order models are likely to give more reliable indication of turning points. Expression(16)issimilartotheoneinHarvey(1989, p. 487). Thereis, however, a slight difference because the form in (13) is analogous to the ‘Butterworth form’ used in Harvey and Trimbur (2003). The alternative form in Harvey (1989) and in Harvey and Stock (1985) is analogous to the ‘balanced form’ also considered in Harvey and Trimbur (2003). The key advantage of the Butterworth form, as used here, is its convenience for the analysis of spectra and gain functions. We have shown that the class of models in (13) are equivalent to CARMA processes whose parameters satisfy the conditions needed for periodic behavior. As an alternative, an openly specified model can be used to describe a general pattern of serial correlation; thus, a CAR(1) could be used to capture first-order autocorrelation in the noise component, for instance, due to temporary effects of weather. When there is clear indication of cyclical dynamics, however, the models in (13) give a more direct analysis that is easier to interpret. The properties of a class of stochastic cycles1 are set out in Trimbur (2006) for the discrete-time case. The properties of the continuous-time models give a similar flexibility in describing periodic behavior. Figure 1 shows the spectrum for parameter values λ = π/4. In particular, the c function (2πσ2) 1γ (λ;ρ,λ ,n) is plotted, where the normalizing constant includes ψ − ψn c the unconditional variance σ2 of the cycle; this is computed in Mathematica by ψ numerical integration of the power spectrum for given values of ρ and n. For 1Notethatthesemodelshaveadifferentformfromthemodelsthatwouldresultfromtheexact discretizationof(13). Ingeneral,startingwithacontinuous-timemodelwithuncorrelatedcomponents leads to adiscretized model that has either correlated components or MA disturbances; one expects, however, that the basic structure of the discrete-time models should remain unchanged. 11

F(cid:2)Λ(cid:3) 1.8 1.6 n (cid:2) 1 1.4 n (cid:2) 2 1.2 1 0.8 0.6 0.4 0.2 Λ 0.5 1 1.5 2 2.5 Figure 1: Spectral density of continuous-time cyclical process for n = 1 and 2 with ρ = 0.7 and λ = π/4. c n = 1, the damping factor is set to ρ = 0.9, and for n = 2, it is set to ρ = 0.75. Lower values of ρ are appropriate for the higher order models because of their resonance property. Thus, the cyclical shocks reinforce the periodicity in ψ (t), n making the oscillations more persistent for given ρ. The difference in spectra in figure 1 indicates that the periodicity is more clearly defined for the second order cycle. The spectrum peaks at a period around 2π/λ for moderate values of λ , say c c π/5 < λ < π, which is the standard business cycle range. The maximum does c not occur exactly at λ = λ , however, except as ρ tends to unity. The case ρ = 1 c gives a nonstationary cycle, where one could, in theory, forecast out to unlimited horizons. Thus, in economic modeling, attention is usually restricted to stationary models where ρ < 1. 12

3 Signal Extraction in Continuous Time This section develops the signal extraction problem in continuous time. A new result with proof is given for estimating a nonstationary signal from stationary noise. Whittle (1983) shows a similar result for nonstationary processes, but omits the proof and in particular, fails to recognize the importance of initial conditions. Kailath, Sayed, and Hassibi (2000, p. 221 — 227) prove the formula for the special case of a stationary signal. We extend the treatment of Whittle (1983) by providing proofs, at the same time illustrating the importance of initial value assumptions to the result. Further, the cases wherethedifferentiatedsignal ornoiseprocess orboth are WN are treated rigorously. 3.1 Nonstationary signal and initial conditions Consider the following model for a continuous time process y(t): y(t) = s(t)+n(t), t R (17) ∈ where n(t) is stationary. The aim is to estimate the underlying signal s(t) in the presence of the noise, and it will be assumed that s(t) I(d), or integrated of order ∼ d. In general, d is any non-negative integer; the special case d = 0 reduces to stationary s(t). In many applications of interest, we have d > 0, so that the dth derivative of s(t), denoted by u(t), is stationary. It is assumed that u(t) and n(t) are mean zero and uncorrelated with one another. In the standard case, both autocovariance functions, R and R , are integrable. An extension could also u n be considered where R or R or both are represented by a multiple of the Dirac u n delta function, which gives rise to tempered distributions (see Folland, 1995); the associated spectral densities are flat, indicating a corresponding WN process. The process y(t) satisfies the stochastic differential equation w(t) = Ddy(t) = u(t)+Ddn(t). (18) From Section 2.2, the spectral density of w(t) is f (λ) = f (λ)+λ2df (λ). (19) w u n 13

From Hannan (1970, p. 81), the nonstationary process y(t) can be written in termsofsomeinitialvaluesplusad-foldintegralofthestationaryw(t). Forexample, when d = 1, t y(t) = y(0)+ w(z)dz Z0 for some initial value random variable y(0). Note that this remains valid both for t > 0 and for t < 0. When d = 2, t z y(t) = y(0)+ty˙(0)+ w(x)dxdz Z0 Z0 for initial position y(0) and velocity y˙(0) = [dy/dt](0). In general, we can write d − 1 tj y(t) = y(j)(0)+[Idw](t) (20) j! j=0 X with the I operator defined by [Idw](t) = t w(z)(t z)d 1dz/(d 1)!. Note that − 0 − − (20) holds for the signal s(t) as well. R For an I(d) process, let y (0) = y(0),y˙(0), ,y(d 1)(0) denote the collection ∗ − { ··· } of d values and higher order derivatives at time t = 0. It is assumed that y (0) ∗ is uncorrelated with both u(t) and n(t) for all t. This assumption is analogous to Assumption A in Bell (1984), except that now higher order derivatives are involved. 3.2 Formula for the optimal filter Consider the theoretical signal extraction problem for a bi-infinite series y(t) that follows (17). The optimal linear estimator of the signal s(t) gives the minimum mean square error. Thus, the goal is to minimize E[(sˆ(t) s(t))2] such that − sˆ(t) = Ψ(L)y(t) = (ψ y)(t) for some weighting kernel ψ. The notation Ψ(L) ∗ for a continuous-lag filter was introduced earlier. The problem is to determine the optimal choice of Ψ(L) for general nonstationary models of the form (17). The following theorem shows the main result. Theorem 1 For the process in (17), suppose that y (0) is uncorrelated with both ∗ u(t) and n(t) for all t. Also, assume that u(t) and n(t) are mean zero weakly stationary processes that are uncorrelated with one another, with autocovariance 14

functions that are either integrable or given by constant multiples of the Dirac delta function, interpreted as a tempered distribution. Let f (λ) u g(λ) = . f (λ) w If g is integrable with d 1 continuous derivatives (if d = 0, we only require that g − be continuous), then the linear minimum mean square error estimate of s(t) is given by sˆ(t) = Ψ(L)y(t) (21) Ψ(L) = ∞ ψ(x)Lxdx Z −∞ ψ(x) = 1[g](x). − F The function ψ(x) is the continuous weighting kernel of the optimal filter. The spectral density of the error process e(t) = sˆ(t) s(t) is − f (λ)f (λ) u n f (λ) = ; e f (λ) w hence the MSE is 2 1 π ∞ f e (λ)dλ. −∞ R If y(t) is Gaussian, then sˆ(t) is optimal among all estimators. The filter Ψ(L) will be referred to as a continuous-lag Wiener-Kolmogorov (WK) filter. This distinguishes Ψ(L) from discrete-time model-based filters, which are only defined over a discrete set of lags. In contrast, here we focus on the model-based filters derived in continuous-time. One of the important properties of the WK filters is that they pass, or preserve, polynomials, in analogy to discrete-lag filters constructed to have this property in discrete-time. In particular, Ψ(L)p(t) = p(t) for a polynomial p(t) of sufficiently low degree. To make this explicit, the filter passes p(t) when ∞ xjψ(x)dx = δ , j,0 Z −∞ 15

for any j up to the degree of p, with δ denoting the Kronecker delta. It is shown in the proof of Theorem 1 that, provided that the associated moments exist, a WK filter passes polynomials of degree up to 2d 1. − Note that the noise and differentiated signal can be either WN or can have integrable autocovariance functions. The signal extraction problem for different cases determines different classes of weighting kernels. We can now define continuous-lag filters that reflect the nonstationary component of a time series. In particular, the nonstationarity means that the signal includes a stochastic trend and so is represented by an integrated process. First, we show a simple example of the case d = 0; this reduces to stationarity, so the only requirement on g is continuity. Example 4 For d = 0, let s(t) have autocovariance function R (h) denoted by s φ(h) = 1 e h2 . Suppose further that n(t) has autocovariance function R (h) = √2π − 2 n (1 h2)φ(h). Then y is characterized by R (h) = (2 h2)φ(h), and the associated y − − spectral densities are f (λ) = e λ2/2, f (λ) = λ2e λ2/2, f (λ) = (1+λ2)e λ2/2 s − n − y − Thesignalresemblesadampedtrend,whereasn(t)isapinknoiseprocessthatincorporatespseudo-cyclicalandirregularfluctuations. Theratioofspectraf (λ)/f (λ) = s y 1 isintegrableandcontinuous,andfromExample2theinverseFourierTransform 1+λ2 gives a simple filter with kernel ψ(x) = 1 e x. 2 −| | Example 5 Consider now the case d = 1, and suppose that the spectral density of the differentiated signal is f (λ) = qφ(λ), where φ has the form of the standard u normal density function, and that f (λ)/f (λ) = q for some constant q. The signal u n extraction filter has a continuous-time frequency response given by qφ(λ) 1 g(λ) = = , qφ(λ)+λ2φ(λ) 1+λ2/q which yields adouble-exponential weightingkernel √qexp √q x /2. This kernel {− | |} passes lines and constants and could be used as a simple device for trend smoothing. 16

4 Illustrations of Continuous-Lag Filtering In this section, examples of continuous-lag WK filters are given for economic time series. The filters are based on the class of CARIMA models; this class is particularly convenient for computing WK weighting kernels and offers flexibility for a range of applications. The spectral densities f and f that enter the formula for u w the gain areboth rational functions inλ2. Takingtheirratioyields anotherrational function in λ2 for g(λ). As these analytical expressions summarize the comprehensive effects of the filter, they can be studied and used in filter design in different contexts. We focus on examples where CARIMA models are set up within different signal extraction problems. The specifications are guided by applications of interest in economics; their solutions rely on the theorem given in the last Section for handling nonstationary series. In the first example, we start with the simplest case, the local level model. The second example considers an extension of the well-known HP filter, which has been widely used in macroeconomics as a detrending method. We show that the expression for the continuous-lag HP filter is relatively simple, and this gives a basis for detrending data with different sampling conditions. Thethirdexampleextendsthetreatmentwithaderivationofcontinuous-laglowpass and band-pass Butterworth filters. This class of filters represents the analogue of the discrete-time filters introduced in Harvey and Trimbur (2003). The bandpass filters arise naturally as cycle estimators in a well-defined model that jointly describes trend, cyclical, and noisy movements. The general cyclical processes in continuous-time aredefinedin an analogousway tothediscrete-time models studied in Trimbur (2006). Note that the cyclical components are equivalent to certain CARMA models. In the analysis of periodic behavior, it is more direct to work with the structural form; the frequency parameter, forinstance, reflects the average, or central, periodicity. The low-pass and band-pass filters we present have the property of mutual consistency. That is, they may be applied simultaneously. Other procedures, in contrast, do not preserve this property when the two filters are designed separately, or when they are based on different source models. 17

It is generally straightforward to investigate the weighting kernels of the WK filters. This involves calculating the residues of rational functions, a standard problem for which well-known procedures are available. Still, the computations can become burdensome in particular cases, so in presenting illustrations, we restrict attention tosome standard filters. In these cases, the derivation of analytical results is feasible, with the expressions simple enough to provide a clear interpretation. In the framework of WK filters, source models can be formulated to adapt to different situations. For instance, some series of Industrial Output are subject to weather effects that induce short-lived serial correlation. In estimating the trend, the base model can be set up with a low-order CAR or CARMA component. The approach to filter design can also be adapted to focus on certain properties of the signal, such as rate of change. Thus, in a more general framework, our target of estimation becomes a functional of the signal. This opens the door to a number of potential applications, such as turning point analysis, where the interest centers on some aspect of the signal’s evolution over an interval. After describing the basic principle, in a fourth example, we examine an application to measuring velocity and acceleration of signal. Illustration 1: Local Level Model The trend plus noise model is written as y(t) = μ(t)+(cid:18)(t) where μ(t) denotes the stochastic level, and (cid:18)(t) is continuous-time white noise with variance parameter σ2, denoted by (cid:18)(t) WN(0,σ2). See Harvey (cid:18) ∼ (cid:18) (1989) for discussion. An interpretation of the variance σ2 is that Θ(L)(cid:18)(t) has (cid:18) autocovariance function (θ θ )(h)σ2 for any (integrable) auxiliary weighting kernel ∗ − (cid:18) θ. The local level model assumes Dμ(t) = η(t), where η(t) WN(0,σ2). The ∼ η signal-noise ratio in the continuous-time framework is defined as q = σ2/σ2. So the η (cid:18) observed process y(t) requires one derivative for stationarity, and we write w(t) = Dy(t). The spectral densities of the differentiated trend and observed process are f (λ) = qσ2 f (λ) = f (λ)+λ2σ2 = (q +λ2)σ2. η (cid:18) w η (cid:18) (cid:18) Thoughtheconstantfunctionf (λ)isnonintegrableovertherealline, thefrequency η response of the signal extraction filter is given by the ratio (1+λ2/q)− 1 , which 18

is integrable. As in the previous example, the weighting kernel has the double exponential shape: √q ψ(x) = exp √q x 2 {− | |} Therateofdecayinthetailsnowdependsonthesignal-noiseratioof theunderlying continuous-time model. Illustration 2: Smooth Trend Model The local linear trend model (Harvey 1989, p. 485) has the following specification: Dμ(t) = β(t)+η(t), η(t) WN(0,σ2) η ∼ Dβ(t) = ζ(t), ζ(t) WN(0,σ2) ∼ ζ where η(t) and ζ(t) are uncorrelated. Setting σ2 = 0 gives the smooth trend model η for which noisy fluctuations in the level are minimized and the movements occur due to changes in slope. The data generating process is y(t) = μ(t)+(cid:18)(t) where (cid:18)(t) is white noise uncorrelated with ζ(t). Now the signal-noise ratio is q = σ2/σ2. ζ (cid:18) w(cid:2)x(cid:3) Continuous Time HP Filter 0.2 Weighting kernels q (cid:2) 1(cid:2)10 q (cid:2) 1(cid:2)40 q (cid:2) 1(cid:2)200 0.1 x (cid:3)10 (cid:3)8 (cid:3)6 (cid:3)4 (cid:3)2 2 4 6 8 10 Figure 2: Weighting kernel for continuous-lag HP filter for q = 1/10,1/40, and 1/200. 19

Recall that the discrete-time smooth trend model underpins the well-known HP filter for estimating trends in discrete time series; see Hodrick and Prescott (1997), as well as Harvey and Trimbur (2003). Here we develop an analogous HP filter for the continuous-time smooth trend model. We may write the model as u(t) = D2μ(t) = ζ(t) w(t) = D2y(t) = ζ(t)+D2(cid:18)(t). The spectral densities of the appropriately differentiated trend and series are f (λ) = qσ2 f (λ) = f (λ)+λ4fσ2 = (q +λ4)σ2. u (cid:18) w u (cid:18) (cid:18) Hence the ratio (1+λ4/q)− 1 gives the frequency response function of the filter; the error spectrum is σ2(1+λ4/q)− 1 . Taking the inverse Fourier transform of this (cid:18) function (see the appendix for details of the derivation) yields the weighting kernel q1/4exp x q1/4/√2 ψ(x) = {−| | } cos( x q1/4/√2)+sin( x q1/4/√2) (22) 2√2 | | | | ³ ´ This gives the continuous-time extension of the HP filter. From the discussion following Theorem 1, the kernel in (22) passes cubics. Figure 2 shows the weighting function for three different values of q. As the signal-noise ratio increases, the trend becomes more variable relative to noise, so the resulting kernel places more emphasis on nearby observations. Similarly, as q decreases, the filter adapts by smoothing over a wider range. The negative sidelobes, apparent in the figure for q = 1/10, enable the filter to pass quadratics. Illustration 3: Continuous-Lag Band-Pass Consider again the class of stochastic cycles in Example 3. A simple (nonseasonal) model for a continuous-time process in macroeconomics is given by y(t) = μ (t)+ψ (t)+ε(t) m n where μ (t) is a trend component that accounts for long-term movements and the m cyclical component ψ (t) follows (13) for index n. The irregular ε(t) is meant to n 20

absorb any random, or nonsystematic variation, and in direct analogy with discretetime, it is assumed that in continuous-time, ε(t) ∼ WN(0,σ2). The definition of ε the m th order trend is − Dmμ (t) = ζ(t), ζ(t) WN(0,σ2) m ζ ∼ for integer m > 0. For m = 1, this gives standard Brownian motion. For m = 2, μ (t) is integrated Brownian motion, the continuous-time analogue of the smooth m trend, as in the previous illustration. In formulating the estimation of ψ (t) as a signal extraction problem, we set the n nonstationary signal to μ (t)+ε(t) and the ‘noise’ to ψ (t). This is done just to m n map the estimation problem to the framework developed in the last Section; it is not intended to suggest any special importance of ‘signal’ as a target of extraction. Actuallyinthiscase, the‘noise’ part will usuallybe of greatest interest in abusiness cycle analysis. Thus, the optimal filterF(L) is constructed forμ (t)+ε(t), and the m complement of this filter, (1 F(L)), yields the band-pass. Similarly, to formulate − the estimation of μ (t), take s(t) = μ (t) and n(t) = ψ (t)+ε(t). m m n Thus, the class of continuous-lag Butterworth filters are given by σ2/λ2m ζ LP (λ) = , m,n n σ ζ 2 +σ2 λ2+log2ρ +σ2 λ2m κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) ε ∙ − ¸ n σ2 λ2+log2ρ κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) BP (λ) = ∙ − ¸ , m,n n σ ζ 2 +σ2 λ2+log2ρ +σ2 λ2m κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) ε ∙ − ¸ where LP (λ) stands for low-pass filter and BP (λ) stands for band-pass filter, m,n m,n both of order pair (m,n). These expressions follow from combining the power spectrum of the cycle with the pseudo-spectrum of μ(t). Defining q = σ2/σ2 as the ζ ζ ε signal-noise ratio for the trendand q = σ2/σ2 as the signal-noise ratio for the cycle, κ κ ε it follows that 21

q ζ LP (λ;q ,q ) = , (23) m,n ζ κ n q +q λ2m λ2+log2ρ +λ2m ζ κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) ∙ − ¸ n q λ2m λ2+log2ρ κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) BP (λ;q ,q ) = ∙ − ¸ , (24) m,n ζ κ n q +σ2 λ2+log2ρ +λ2m ζ κ (log2ρ+(λ λc)2)(log2ρ+(λ+λc)2) ∙ − ¸ Here the order m = d denotes the order of integration as determined by the stochastictrendmodel. Thedefinitionsin(23)and(24)parallelthedevelopmentofHarvey and Trimbur (2003) for the discrete-time case. Note that in the continuous-time case, we must have integrability of the frequency response function over the entire real line rather than over a restricted interval. G(cid:2)Λ(cid:3) 1 Low(cid:3)Pass 0.8 Band(cid:3)Pass 0.6 0.4 0.2 Λ 0.5 1 1.5 2 2.5 Figure 3: Gain functions of a pair of consistent low-pass and band-pass filters. The underlying model has m = 2, n = 2, with cyclical parameters ρ = 0.9,λ = π/4 and c signal-noise ratios q = 0.1,q = 1. ζ κ Figure 3 illustrates the low-pass and band-pass gain functions for trend order m = 2 and cycle orders n = 2. The low-pass dips at intermediate frequencies to 22

accommodate the presence of the cycle in the model. Figure 4 shows a comparison of the band-pass filter for n = 2 and 4. The other parameters are the same as in the previous figure. Note the increased sharpness produced by the higher order model. G(cid:2)Λ(cid:3) 1 n (cid:2) 2 0.8 n (cid:2) 4 0.6 0.4 0.2 Λ 0.5 1 1.5 2 2.5 Figure 4: Gain function of band-pass filters for n = 2 and 4. The other parameters are the same as in the previous figure. Illustration 4: Smooth Trend Velocity and Acceleration In some applications, interest centers on some property of the signal, such as its growth rate, rather than on the value of the signal itself. In particular, consider the linear operator H = Dm. The conditional expectation of Hs(t) is equal to H applied to the conditional expectation of s(t), since H is linear. So for Gaussian processes, assuming that λmg(λ) is integrable — where g is the frequency response of the original WK filter — the weighting kernel for estimating Dms(t) is given by the mth derivative of ψ, that is, ψ(m)(x). The first derivative of the signal indicates a velocity, or growth rate. The second derivative indicates acceleration, or variation in growth rate. More generally, we can consider signals Hs(t) with H a linear operator. To compute the mean squared error of (HΨ(L))y(t) as an estimate of the target Hs(t), 23

multiply the error spectrum from Theorem 1 by the squared magnitude of [H](λ). F Thisresultsinthespectrumofthenewerror,whoseintegralequalsthemeansquared error. If, for example, H = D then the error spectrum is multiplied by by λ2, and the result is then integrated over ( , ). −∞ ∞ Velocity and acceleration estimates can be computed for the HP filtered signal. The filters are constructed directly from the Smooth Trend model. In Newtonian mechanics, a local maximum in a particle’s trajectory is indicated by zero velocity together with a negative acceleration; similarly, velocity and acceleration indicators may be used to discern a downturn or recession in a macroeconomic series. w(cid:2)x(cid:3) Velocity HP Filter 0.04 Weighting kernels q (cid:2) 1(cid:2)10 q (cid:2) 1(cid:2)40 0.02 q (cid:2) 1(cid:2)200 x (cid:3)10 (cid:3)8 (cid:3)6 (cid:3)4 (cid:3)2 2 4 6 8 10 (cid:3)0.02 (cid:3)0.04 Figure 5: Weighting Kernels for Velocity WK filter based on Smooth Trend model for q = 1/10,1/40, and 1/200. Since λ2(1+λ4/q)− 1 is integrable, both derivatives of ψ are well-defined. Direct calculation yields q1/2 ψ ˙ (x) = e q1/4x/√2 sin(q1/4x/√2) − | | − 2 q3/4 ψ ¨ (x) = e q1/4x/√2 cos(q1/4 x /√2) sin(q1/4 x /√2) . − | | −2√2 | | − | | ³ ´ 24

w(cid:2)x(cid:3) 0.04 Acceleration HP Filter Weighting kernels q (cid:2) 1(cid:2)10 0.02 q (cid:2) 1(cid:2)40 q (cid:2) 1(cid:2)200 x (cid:3)10 (cid:3)8 (cid:3)6 (cid:3)4 (cid:3)2 2 4 6 8 10 (cid:3)0.02 (cid:3)0.04 Figure 6: Weighting Kernels for Acceleration WK filter based on Smooth Trend model for q = 1/10,1/40, and 1/200. The velocity filter, or first derivative with respect to time, has the interpretation of a growth rate for the trend. The weighting kernel in Figure 5 shows how the growth in the signal is assessed by comparing forward-looking displacements with recent displacements. Likewise, the acceleration indicates the second derivative, or curvature. The weighting kernel in Figure 6 has a characteristic sharp decline around the origin, so that contemporaneous and nearby values are subtracted in estimating changes in growth. 5 Application: unequally sampled data In this Section, we outline a procedure for the practical application of the method. The discussion of discretization is kept concise, as this material is set out in detail in McElroy and Trimbur (2007). Starting with a base model incontinuous-time, the classification into stock and 25

flow is reflected in the measurement of observations. Denote the underlying process by y(t). Given the sampling interval δ > 0, a stock observation at the τth time point is defined as y = y(δτ). (25) τ The times of observations correspond to t = δτ for integer τ. The discrete τ stock time series is then the sequence of values {y . τ } ∞τ= −∞ A series of flow observations has the form δτ y = y(v)dv. (26) τ Zδ(τ 1) − where δ is both the interval of cumulation and the interval separating successive observation points. Note that, more generally, the times ...,t ,t , ,t ,... need 1 2 τ ··· not be equally spaced, but for now we assume for simplicity that the spacing is constant at t t = δ. τ τ 1 − − Forafinitesample, lety = (y ,y , ,y ) bethecolumnvectorofobservations. 1 2 T 0 ··· Then for a Gaussian process y(t), the law of iterated conditional expectations yields E[s(t) y] = E[(ψ y)(t) y] = ψ(t z)E[y(z) y]dz. (27) | ∗ | − | Z That is, our best estimate of the signal at any time t, given the observations y, is a convolution of the weighting kernel ψ with an interpolated and extrapolated estimates E[y(z) y]. Thus the estimate of the signal is computed as follows: | 1. Determine ψ from a fitted continuous-time model. 2. Compute E[y(z) y] for a set of z values on a fine mesh. | 3. Compute a numerical approximation to the integral in (27) and in this way approximate the signal estimate. Explicit worked examples are beyond the scope of this paper, but the above suggests how the continuous-lag filter could be directly applied for a general problem. Another approach, which we prefer, is to first discretize ψ and then apply the appropriate discrete filter to the observed data y, and this approach is set out in detail in McElroy and Trimbur (2007). For now, it should be emphasized that our 26

approach, based on a continuous-lag kernel, can handle signal estimation in a rather general context, that is, with an unequally spaced series of stock or flow data, and a with a signal time point lying in between observation times. This generality of the signal extraction problem cannot be achieved in a purely discrete-time setting and could only possibly be achieved, with great difficulty, in an approach requiring full model discretization. 6 Conclusion This paper has solved the problem of establishing a theoretical foundation for continuous-timesignalextractionwithnonstationarymodels. Economicseriescommonly show some kind of stochastic trend. The rigorous treatment of nonstationarity given in this paper thus paves the way for the design of filters appropriate in economics. As examples we have presented a new class of low-pass and band-pass filters for time series. Infurtherwork(seeMcElroy andTrimbur, 2007), weshowhowsuchcontinuouslagfiltersmaybediscretizedforapplicationtorealdata. Onespecialcaseofinterest is howtoadapt theHPfiltertochangingobservationinterval andtodifferent modes of measurement, such as stock and flow sampling. More generally, a broad range of filters may be used as the basis for analysis. In addition to model flexibility, there is also flexibility how the WK filters may be adapted to the target of estimation. This has been illustrated with velocity and acceleration filters that could be used in applications where turning point indicators are of interest. A key aspect of our approach is the rigor and generality of the treatment. A continuous-lag filter gives the basis for estimating a flexible target signal when the sample has various properties, such as unequal spacing, stock or flow sampling, missing data, and mixed frequency data. Acknowledgements. TheauthorsthankDavidFindleyforhelpfulcommentsand discussion. 27

Appendix: Proofs Proof of Theorem 1. Throughout, we shall assume that d > 0, since the d = 0 case is essentially handled in Kailath et al. (2000). In order to prove the theorem, it suffices to show that the error process e(t) = sˆ(t) s(t) is orthogonal to the − underlying process y(h). By (20), it suffices to show that e(t) is orthogonal to w(t) and the initial values y . So we begin by analyzing the error process produced by ∗ the proposed weighting kernel ψ = 1[g]. We first note the following interesting − F property of ψ. The moments of ψ dk f (λ) zkψ(z)dz = ik u dλk f (λ)| λ=0 w Z for k < d exist by the smoothness assumptions on g, and are easily shown to equal zero if 0 < k < 2d (i.e., for d k < 2d, the moments are zero so long as ≤ they exist — their existence is not guaranteed by the assumptions of the theorem). Moreover, the integral of ψ is equal to 1 if d > 0. These properties ensure (when d > 0) that the filter Ψ(L) passes polynomials of degree less than d. This is because Ψ(L)tj = tj for j < d. We first note that representation (20) also extends to the signal: s(t) = d 1 tjs(j)(0)+[Idu](t). Then the error process is − j=0 j! Pe(t) = (ψ y)(t) s(t) = (ψ s)(t) s(t)+(ψ n)(t). ∗ − ∗ − ∗ Since Ψ(L) passes polynomials, (ψ s)(t) s(t) = (ψ(x) ∆ (x))[Idu](t x)dx, 0 ∗ − − − where∆ isthe Dirac deltafunction. Note that any filterthat does not passpolyno- 0 R mials cannot be MSE optimal, since the error process will grow unboundedly with time. So we have (cid:18)(t) = (ψ(x) ∆ (x))[Idu](t x)dx+ ψ(x)n(t x)dx, 0 − − − Z Z which is orthogonal to y by Assumption A. Due to the representation (20), it is ∗ sufficient to show that the error process is uncorrelated with [Idw](t). For any real h E[(cid:18)(t)w(t+h)] = (ψ(x) ∆ 0 (x))E [Idu](t x)[Idu](t+h) dx (A.1) − − Z ¡ d − 1 (t+h)j¢ + ψ(x)E n(t x) n(t h) n(j)(0) dx, − − − j! " Ã !# Z j=0 X 28

which uses the fact that [Idw](t) = [Idu](t)+n(t) d 1 tjn(j)(0). Now we have − − j=0 j! t x t+h (t x r)dP1(t+h z)d 1 E [Idu](t − x)[Idu](t+h) = − − − (d − 1)!2 − − R u (r − z)dzdr. Z0 Z0 − £ ¤ (A.2) If f is integrable, we can write R (h) = 1 f (λ)eiλhdλ. If R ∆ instead, then u u 2π u u ∝ 0 f 1; we can still use the above Fourier representation of R in (A.2), because the u R u ∝ various integrals will take care of the non-integrability of f automatically. Since u x eiλydy = (1 eiλx)/(iλ), we obtain that (A.2) is equal to 0 − R1 d − 1 ( iλ)j d − 1 (iλ)j f (λ)λ 2d e iλ(t h) − (t h)j eiλ(t x) (t x)j dλ. u − − − − 2π − j! − − j! − à !à ! Z j=0 j=0 X X When integrated against ψ(x) ∆ (x), we use the moments property of ψ to obtain 0 − 1 d − 1 ( iλ)j f (λ)λ 2d e iλ(t h) − (t h)j eiλtΨ(e iλ) eiλt dλ u − − − − 2π − j! − − à ! Z j=0 X ¡ ¢ = 1 f (λ)− f n (λ) eiλh d − 1 ( − iλ)j (t h)jeiλt dλ. u 2π f (λ) − j! − w à ! Z j=0 X This uses Ψ(e iλ) 1 = λ2df (λ)/f (λ), which is not integrable if f 1; yet − n w n − − ∝ f f /f will be integrable under the conditions of the theorem. As for the noise u n w term in (A.1), we first note that n(j)(t) exists for each j < d since w(t) exists by assumption; this existence is interpreted in the sense of Generalized Random Processes (Hannan, 1970). In particular 1 ψ(x)E[n(t x)n(t h)]dx = ψ(x)R n (x h)dx = f n (λ)eiλhΨ(e − iλ)dλ. − − − 2π Z Z Z This Fourier representation is valid even when f 1, since Ψ(e iλ) is integrable n − ∝ by assumption. Similarly, ∂j ∂j ∂j E[n(t − x)n(j)(0)] = ∂zj E[n(t − x)n(z)] | z=0 = ∂zj R n (t − x − z) | z=0 = ∂xj R n (t − x) where the derivatives are interpreted in the sense of distributions — i.e., when this quantity is integrated against a suitably smooth test function, the derivatives are passed over via integration by parts: ψ(x)E[n(t x)n(j)(0)]dx = ( 1)j ψ(j)(x)R n (t x)dx. − − − Z 29 Z

SinceλjΨ(e iλ)forj < disintegrablebyassumption,wehaveψ(j)(x) = 1 (iλ)jΨ(e iλ)eiλxdλ, − 2π − and the second term in (A.1) becomes R 1 d − 1 ( iλ)j(t h)j f (λ)Ψ(e iλ) eiλh − − eiλt dλ. n − 2π − j! Ã ! j=0 X This cancels with the first term of (A.1), which shows that Ψ(L) is MSE optimal. Using similar techniques, the error spectral density is obtained as well. ¤ Derivation of the Weighting Kernel in Illustration 2. We compute the Fourier Transform via the Cauchy Integral Formula (Ahlfors, 1979), letting q = 1 for simplicity: 1 1 ∞ e iλxdλ − 2π 1+λ4 Z −∞ We can replace x by x because the integrand is even. The standard approach is to | | compute the integral of the complex function eizx | | f(z) = 1+z4 along the real axis by computing the sum of the residues in the upper half plane, and multiplying by 2πi (since f is bounded and integrable in the upper half plane). It has two simple poles there: eiπ/4 and ei3π/4. The residues work out to be e x(1 i)/√2 (z eiπ/4)f(z) = −| | − − | eiπ/4 4i(1+i)/√2 e x(1+i)/√2 (z ei3π/4)f(z) = −| | − | ei3π/4 4i(1 i)/√2 − respectively. Summing these and multiplying by i gives the desired result, after some simplification. To extend beyond the q = 1 case, simply let x q1/4x and 7→ multiply by q1/4 by change of variable. ¤ References [1] Ahlfors, L. (1979) Complex Analysis. New York, New York: McGraw-Hill. 30

[2] Bell, W. (1984). Signal extraction for nonstationary time series. The Annals of Statistics 12, 646 — 664. [3] Bergstrom, A. R. (1988) TheHistory of Continuous-TimeEconometric Models. Econometric Theory 4, 365-383. [4] Bergstrom, A. R. (1990) Continuous Time Econometric Modelling. New York, New York: Oxford University Press. [5] Brockwell, P. (2001) Lévy-Driven CARMA Processes. Annals of the Institute of Statistical Mathematics 53, 113—124. [6] Brockwell, P. and Marquardt, T. (2005) Lévy-Driven and Fractionally Integrated ARMA Processes with Continuous Time Parameter. Statistica Sinica 15, 477-494. [7] Chambers, M. and McGarry, J. (2002) Modeling Cyclical Behavior With Differential-Difference Equations in an Unobserved Components Framework. Econometric Theory 18, 387—419. [8] Folland, G. (1995) Introduction to Partial Differential Equations. Princeton: Princeton University Press. [9] Gandolfo, G. (1993) Continuous Time Econometrics. London, England: Chapman and Hall. [10] Hannan, E. (1970) Multiple Time Series. New York, New York: Wiley. [11] Harvey, A. and Stock, J. (1985) The Estimation of Higher-Order Continuous- Time Autoregressive Models. Econometric Theory 1, 97-117. [12] Harvey, A. and Stock, J. (1993) Estimation, Smoothing, Interpolation, and Distribution for Structural Time-Series Models in Continuous Time. In P.C.B. Phillips (ed.), Models, Methods and Applications of Econometrics, 55-70. [13] Harvey, A. and Trimbur, T. (2003) General Model-Based Filters for Extracting CyclesandTrendsinEconomicTimeSeries.Reviewof Economics andStatistics 85, 244-255. 31

[14] Harvey, A.andTrimbur, T. (2007)TrendEstimation, Signal-NoiseRationsand the Frequency of Observations. In G. L. Mazzi and G. Savio (ed.), Growth and Cycle in the Eurozone, 60-75. Basingstoke: Palgrave MacMillan. [15] Hodrick, R., and Prescott, E. (1997) Postwar U.S. Business Cycles: An Empirical Investigation. Journal of Money, Credit, and Banking 29, 1 - 16. [16] James, R., and Belz, M. (1936) On a Mixed Difference and Differential Equation. Econometrica 4, 157-160. [17] Jones, R. (1981) Fitting a Continuous-Time Autoregression to Discrete Data. In D.F. Findley (ed.), Applied Time Series Analysis, 651-674. New York: Academic Press. [18] Kailath, T., Sayed, A., andHassibi, B. (2000)Linear Estimation.UpperSaddle River, New Jersey: Prentice Hall. [19] Kalecki, M. (1935) A Macrodynamic Theory of Business Cycles. Econometrica 3, 327-344. [20] Koopmans, L. (1974) The Spectral Analysis of Time Series. New York, New York: Academic Press, Inc. [21] Maravall, A. and del Rio, A. (2001). Time Aggregation and the Hodrick- Prescott Filter. Bank of Spain Working Paper 0108. [22] McElroy, T., and Trimbur, T. (2007) A coherent approach to filter design and interpolationfornonstationarystock andflowtime seriesobservedatavariable sampling frequency. mimeo [23] Priestley, M. (1981) Spectral Analysis and Time Series. London: Academic Press. [24] Ravn, M. and Uhlig, H. (2002). On Adjusting the HP Filter for the Frequency of Observation. Review of Economics and Statistics 84, 371 — 380. [25] Stock, J.(1987)MeasuringBusinessCycleTime.The Journal of Political Economy 95, 1240-1261. 32

[26] Stock, J. (1988) Estimating Continuous-Time Processes Subject to Time Deformation: An Application to Postwar U.S. GNP. Journal of the American Statistical Association 83, 77-85. [27] Trimbur, T.(2006)Propertiesofhigherorderstochasticcycles.JournalofTime Series Analysis 27, 1-17. [28] Whittle, P. (1983) Prediction and Regulation. Oxford: Blackwell Publishers. 33

Cite this document
APA
Tucker S. McElroy and Thomas M. Trimbur (2007). Continuous Time Extraction of a Nonstationary Signal with Illustrations in Continuous Low-pass and Band-pass Filtering (FEDS 2007-68). Board of Governors of the Federal Reserve System, Finance and Economics Discussion Series. https://whenthefedspeaks.com/doc/feds_2007-68
BibTeX
@techreport{wtfs_feds_2007_68,
  author = {Tucker S. McElroy and Thomas M. Trimbur},
  title = {Continuous Time Extraction of a Nonstationary Signal with Illustrations in Continuous Low-pass and Band-pass Filtering},
  type = {Finance and Economics Discussion Series},
  number = {2007-68},
  institution = {Board of Governors of the Federal Reserve System},
  year = {2007},
  url = {https://whenthefedspeaks.com/doc/feds_2007-68},
  abstract = {This paper sets out the theoretical foundations for continuous-time signal extraction in econometrics. Continuous-time modeling gives an effective strategy for treating stock and flow data, irregularly spaced data, and changing frequency of observation. We rigorously derive the optimal continuous-lag filter when the signal component is nonstationary, and provide several illustrations, including a new class of continuous-lag Butterworth filters for trend and cycle estimation.},
}