TREND EXTRACTION FROM TIME SERIES WITH STRUCTURAL BREAKS AND MISSING OBSERVATIONS

Similar documents
Ekkehart Schlicht: Trend Extraction From Time Series With Structural Breaks and Missing Observations

Ekkehart Schlicht: Trend Extraction From Time Series With Structural Breaks

Ekkehart Schlicht: Estimating Time-Varying Coefficients With the VC Program

RIDGE REGRESSION REPRESENTATIONS OF THE GENERALIZED HODRICK-PRESCOTT FILTER

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Financial Econometrics / 49

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Fin. Econometrics / 53

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

OPERATIONS RESEARCH. Transportation and Assignment Problems

Searching for the Output Gap: Economic Variable or Statistical Illusion? Mark W. Longbrake* J. Huston McCulloch

Slides 12: Output Analysis for a Single Model

6 Evolution of Networks

Chapter 3: Regression Methods for Trends

Seasonal Adjustment using X-13ARIMA-SEATS

Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model

SMOOTHIES: A Toolbox for the Exact Nonlinear and Non-Gaussian Kalman Smoother *

Estimating Missing Observations in Economic Time Series

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Finite Math - J-term Section Systems of Linear Equations in Two Variables Example 1. Solve the system

Checking Monotonicity is NP-Hard Even for Cubic Polynomials

Introduction to Macroeconomics

ENGRG Introduction to GIS

Measuring the efficiency of assembled printed circuit boards with undesirable outputs using Two-stage Data Envelopment Analysis

Lecture 7: Exponential Smoothing Methods Please read Chapter 4 and Chapter 2 of MWH Book

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Linear Models 1. Isfahan University of Technology Fall Semester, 2014

Inverses and Elementary Matrices

AN-1301 APPLICATION NOTE

Interaction effects for continuous predictors in regression modeling

3 Time Series Regression

Fundamentals of Data Assimila1on

Macroeconomics Theory II

A Generalized Uncertainty Principle and Sparse Representation in Pairs of Bases

DEGREE SEQUENCES OF INFINITE GRAPHS

Stephen F Austin. Exponents and Logarithms. chapter 3

Chapter 1 Statistical Inference

Andreas Blöchl: Trend Estimation with Penalized Splines as Mixed Models for Series with Structural Breaks

The Information Content of Capacity Utilisation Rates for Output Gap Estimates

Machine Learning Linear Regression. Prof. Matteo Matteucci

Time Series. Anthony Davison. c

ECON 4160: Econometrics-Modelling and Systems Estimation Lecture 9: Multiple equation models II

ARIMA Modelling and Forecasting

Two-Stage Stochastic and Deterministic Optimization

Chapter 1: Systems of Linear Equations

Lecture 6. Numerical methods. Approximation of functions

E(s 2 )-OPTIMAL SUPERSATURATED DESIGNS

TRANSPORTATION PROBLEMS

IB Physics STUDENT GUIDE 13 and Processing (DCP)

TOPOLOGICAL COMPLEXITY OF 2-TORSION LENS SPACES AND ku-(co)homology

MULTIPLE LINEAR REGRESSION IN MINITAB

Linear Algebra. Preliminary Lecture Notes

How Can We Extract a Fundamental Trend from an Economic Time-Series?

Monoid Modules and Structured Document Algebra

We first repeat some well known facts about condition numbers for normwise and componentwise perturbations. Consider the matrix

Introduction: the Abruzzo earthquake The network and the processing strategies. displacements estimation at earthquake epoch. horizontal displacements

Math From Scratch Lesson 24: The Rational Numbers

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

A Hierarchical Perspective on Lee-Carter Models

Part I State space models

Name Date Class HOW TO USE YOUR TI-GRAPHING CALCULATOR. TURNING OFF YOUR CALCULATOR Hit the 2ND button and the ON button

Making sense of Econometrics: Basics

Toutenburg, Fieger: Using diagnostic measures to detect non-mcar processes in linear regression models with missing covariates

Anti-Slide. Regular Paper. Kazuyuki Amano 1,a) Shin-ichi Nakano 1,b) Koichi Yamazaki 1,c) 1. Introduction

SEASONAL AND ANNUAL TRENDS OF AUSTRALIAN MINIMUM/MAXIMUM DAILY TEMPERATURES DURING

Online Appendix: Misclassification Errors and the Underestimation of the U.S. Unemployment Rate

peak half-hourly Tasmania

Elements of Multivariate Time Series Analysis

Empirical Project, part 1, ECO 672

Primitive Digraphs with Smallest Large Exponent

peak half-hourly New South Wales

Systematic strategies for real time filtering of turbulent signals in complex systems

y b where U. matrix inverse A 1 ( L. 1 U 1. L 1 U 13 U 23 U 33 U 13 2 U 12 1

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

Recommender Systems. Dipanjan Das Language Technologies Institute Carnegie Mellon University. 20 November, 2007

SOLVING TRIGONOMETRIC EQUATIONS

Univariate linear models

Introduction. Chapter 1

1 Matrices and Systems of Linear Equations. a 1n a 2n

Forecasting 1 to h steps ahead using partial least squares

CSCI 150 Discrete Mathematics Homework 5 Solution

STRUCTURAL TIME-SERIES MODELLING

Lecture 2. Business Cycle Measurement. Randall Romero Aguilar, PhD II Semestre 2017 Last updated: August 18, 2017

Optimizing Gaia s Photometric System: Thoughts on distance measure and figure of merit

Chapter 9: Systems of Equations and Inequalities

Nonsense Regressions due to Neglected Time-varying Means

Threshold effects in Okun s Law: a panel data analysis. Abstract

Estimation of IMFP except for a constant factor using only XPS background-optimized peak intensities and cross sections

THE PRESSURE FIELD IN THE GAS-LUBRICATED STEP SLIDER BEARING

Chapter 14. Linear least squares

Algorithms and Data Structures 2016 Week 5 solutions (Tues 9th - Fri 12th February)

Finding normalized and modularity cuts by spectral clustering. Ljubjana 2010, October

A Note on Object Allocation under Lexicographic Preferences

Estimating the parameters of hidden binomial trials by the EM algorithm

UNIT-I ECONOMIC OPERATION OF POWER SYSTEM-1

inputs. The velocity form is used in the digital implementation to avoid wind-up [7]. The unified LQR scheme has been developed due to several reasons

Warwick Business School Forecasting System. Summary. Ana Galvao, Anthony Garratt and James Mitchell November, 2014

Vector Spaces. Chapter 1

Scientific Computing

Automatic Differentiation Equipped Variable Elimination for Sensitivity Analysis on Probabilistic Inference Queries

Feb 21 and 25: Local weighted least squares: Quadratic loess smoother

Transcription:

J. Japan Statist. Soc. Vol. 3 No. 5 9 TREND EXTRACTION FROM TIME SERIES WITH STRUCTURAL BREAKS AND MISSING OBSERVATIONS Ekkehart Schlicht* Trend extraction from time series is often performed by using the filter proposed by Leser (191), also known as the Hodrick-Prescott filter. Practical problems arise, however, if the time series contains structural breaks (as produced by German unification for German time series, for instance), or if some data are missing. This note proposes a method for coping with these problems. Key words and phrases: Break point, break point location, dummies, gaps, Hodrick- Prescott filter, interpolation, Leser filter, missing observations, smoothing, spline, structural breaks, time-series, trend. 1. Introduction Trend extraction from time series is often performed by using the filter proposed by Leser (191), also known as the Hodrick-Prescott filter, or HP-Filter. Practical problems arise, however, if the time series contains structural breaks (as produced by German unification for German time series, for instance), or if some data are missing. This note proposes a method for coping with these problems.. The Leser filter 1 The idea proposed by Leser (191) for the case where all data are available is to look for a trend y R T such that deviation (.1) u = x y is small and the trend is smooth. The size of the deviation is measured by the sum of squared residuals u u, and the smoothness of the trend is measured by the sum of squares of changes in the direction of the trend v v where the trend disturbances v R T are defined as v t =((y t y t 1 ) (y t 1 y t )) t =3,,...,T or (.) v = Py Received June 1, 7. Revised February,. Accepted February 7,. *Department of Economics, University of Munich, Schackstr., 0539 Munich, Germany. schlicht@lmu.de 1 The formalization below follows Schlicht (191). Email:

EKKEHART SCHLICHT with 1 1 0 P := 1 1 0 1 1 of order (T ) T. The decomposition of the original series x into trend y and and residual u is obtained by minimizing the weighted sum of squares (.3) V = u u + α v v =(x y) (x y)+α y P Py with respect to y. The smoothing constant α denotes the weight given to the trend deviations. It is typically selected in an arbitrary way but may also be estimated from the time series (Schlicht (5)). Minimization of (.3) entails the first-order condition (.) (I T + α P P )y = x. As (I + αp P ) is positive definite, the second order condition is satisfied in any case. Equation (.) has the unique solution (.5) y =(I T + αp P ) 1 x which defines the Leser-Filter. It associates a trend y with the time series x, depending on the smoothing parameter α. From (.3) and (.5) we obtain (.) V = x (I T (I T + α P P ) 1 )x as the value of the criterion function (.3). 3. Formalizing structural breaks and missing observations Practical problem arise with time series containing structural breaks and missing observations. Equation (.5) would interpret structural breaks as changes in the trend, and cannot even be applied if some data points are missing. The obvious way to generalize the filter in order to cope with this problem is to introduce dummies for the structural breaks, and to substitute missing values of the time series by numbers that minimize the criterion function (.3) and generate a trend as smooth as possible. This can be done as follows. Consider a raw time series x of length T with m structural breaks and n missing data points. We require m + n T and m 0 and n 0. The structural breaks occur at points in time b =(b 1,b,...,b m ) Z m +, where Z + denotes the set on non-negative integers. For instance, if the first break point is at t = 3, we would have b 1 = 3. The missing data are missing at points

MISSING OBSERVATIONS AND STRUCTURAL BREAKS 7 c =(c 1,c,...,c n ) Z n +. If the first missing data point is at t = 5, we would similarly have c 1 =5. Given this information, we define the filled time series x R T by taking the raw time series x and replacing all undefined elements by zero, viz. x ci = 0 for all i =1,,...,n. Further, we define a T m matrix D with elements d i,j = 0 for i<b j and d i,j = 1 for i b j. For T = 5 and break points at b 1 = and b = we would have, for example, D =. 11 11 In a similar way, we define a T n matrix E with elements e i,1 = 1 if the first missing variable is x i, e j, = 1 if the second missing variable is x j, etc., and all other components of E being zero. For T = 5 and variables and missing we would have, for example E =. 01 The block matrix F =(D, E) combines these two matrices and will be used for further computations. It is of order T (m + n), and we require that it is of full rank m + n. This assumption assures that missing observations do not mask structural breaks fully. With the above example we would have rank(d, E) =, and the requirement would be satisfied, but if we had D as above and E = 01 we would have rank(d, E) = 3 and the requirement would not be met; a structural break would entirely be masked by missing data. Define further the vector of dummies d R m, where d i is the dummy for the i-th structural break and define the vector e R n of replacements for the missing (or empty) observations. We combine these two vectors in the vector

EKKEHART SCHLICHT f =(d,e ) R m+n. Given these definitions, the stage is set for dealing with the estimation problem.. Estimation Define the amended vector of observations as (.1) x = x + Ff. It is a function of the filled time series x, the values assumed for the dummies d, and the replacements e comprised in the vector f. The vector f can now easily be determined by replacing x by x in (.), and minimizing this expression. Thus we obtain the quadratic form (.) V =( x + f F )(I T (I T + α P P ) 1 )( x + Ff) that is to be minimized with respect to f. The necessary condition for a minimum is (.3) V s =F (I T (I T + α P P ) 1 )( x + Ff)=0, and the second-order condition is that F (I T (I T + α P P ) 1 )F be positive definite. As we can write (I T + αp P ) 1 = I T αp P +(αp P ) (αp P ) 3 + (I T (I T + α P P ) 1 )=αp (I T + α PP ) 1 P. Hence (I T (I T + α P P ) 1 ) is non-negative definite of rank T and F (I T (I T + α P P ) 1 )F = αf P (I T + α PP ) 1 PF has full rank and is positive definite. Therefore equation (.3) defines the unique minimizing choice of the dummies and missing terms as (.) f = (F (I T (I T + α P P ) 1 )F ) 1 F (I T (I T + α P P ) 1 ) x. The refurbished time series is obtained now by inserting (.) into (.1) x = x + Ff and the trend is obtained by using the refurbished series x instead of the original series x in (.5): y =(I T + αp P ) 1 ( x + Ff ). This gives the trend of the time series with structural breaks and missing observations x.

MISSING OBSERVATIONS AND STRUCTURAL BREAKS 9 1 1 with break 1 1 with break 1 original 1 original corrected corrected 0 30 0 50 (a) 0 30 0 50 (b) Figure 1. (a) The original US unemployment rate 1951 has been augmented by adding, beginning with period 5, five percentage points to the original series. The corrected series overcorrects the structural break in this case. (b) The smoothed series reproduce this pattern. (Smoothing constant is α = 1, data from the Bureau of Labor Statistics.) 5. Example: Structural breaks As an example for treating structural breaks, consider the time series of US unemployment (Fig. 1). Beginning with period 5, a structural break has been introduced by adding 5 percentage points to the original time series. The correction obtained by the method sketched above overcorrects this break by subtracting 7. percentage points. The corrected trend estimation is overcorrected as well. As can be seen, the correction produces a smoother trend than the original one, as is implied by the logic of the method. A manual correction would look not very much different, or would look even worse if the adjustment is made such that the adjacent data points and 5 are made to have identical values. (The correction would have been 7. rather than 7. in this case.) The example illustrates the functioning, as well as the problem of introducing dummies, as these will not only correct for structural breaks, but will also mask changes in the underlying trend. Another illustration is provided in Fig. (a). It depicts the time series with the structural break, as given in Fig. 1(a) together with the estimated trend of the corrected series plus the estimated structural break.. Digression: Locating structural breaks Sometimes the analyst may be in doubt about the exact positioning of the structural break. A simple way to deal with such uncertainty would be to estimate corrected time paths x for alternative break points and evaluate the criterion (.) for these alternative time-paths. The preferred break point would be the one giving the smallest value for the criterion. Figure (b) depicts the value of the criterion for alternative break points and the corresponding corrected time paths. The minimum is attained at the correct break point 5. All computations done with the package by Ludsteck ().

90 EKKEHART SCHLICHT 1 1 1 0 0 30 0 50 0 30 0 50 (a) Time series and estimated trend with estimated break. 5 (b) The criterion (.) for alternative break points. Figure. (a) The time series with breaks (the top time series from Fig. 1(a)) together with the the estimated trend (the bottom series from Fig. 1(b)), increased by the estimated jump of 7. from period 5 upwards. (b) The criterion (.) for the time series depicted in Fig. (a) corrected for alternative assumed break points. The minimum occurs at point 5, which is the correct break point. 0 30 0 50 Figure 3. US unemployment 1959, original series and smoothed series, using a smoothing constant α = 1. The arrow indicate values that have been omitted in order to produce a time series with missing data. (Data Source: Bureau of Labor Statistics.) 7. Example: Missing observations Consider again the time series of US unemployment (Fig. 3). I have deleted two data points, numbers 3 and 7, with values of.9% and 7.0%, respectively, to obtain a time series with missing observations. The gap at 7 is uncritical because the point sits in the middle of the data range, and assumes also a middle position between adjacent data points. The gap at 3 is critical, as it is close to the boundary of the time series, and is also extreme in its deviation from the trend.

MISSING OBSERVATIONS AND STRUCTURAL BREAKS 91 5 replaced 7.5 7 deleted 3 deleted.5 replaced 1 5.5 3 5 7 9 30 (a) (b) Figure. Deleted values and their computed replacements at data points 3 (a) and 7 (b). 7 0.1 0.05 5-0.05-0.1-0.15 0 30 0 50 0 30 0 50-0. -0.5 (a) (b) Figure 5. (a) Original trend estimation and trend estimated from incomplete data (b) the difference between these two trend estimates. The arrows indicate the position of the gaps in the data. Dropping these values and estimating replacements according to the method outlined above yields estimated values.% and.9%. This is illustrated in Fig.. The two trend series are depicted in Fig. 5. It can be seen that the omission at data point 3 has a noticeable effect, while the omission at data point 7 does not change the trend estimate in any significant way. Looking at the substitutions illustrated in Fig., it may be asked whether a simple linear interpolation would not do as well. In a way, this seems a reasonable position to take. However, and practically speaking, with contemporary computing power, gap detection and the substitution would be done automatically in both cases. If adjacent gaps occur, linear interpolation would require case distinctions that are not necessary with the method proposed here. In this sense, the proposed method is computationally simpler.. Concluding comments The unified treatment of structural breaks and missing observations proposed here may not, practically speaking, be very much different from doing similar adjustments by hand, as is common practice. The treatment proposed here can easily be automated, though, and appears less arbitrary. Further, the

9 EKKEHART SCHLICHT dummies selected here, and the substitutes for missing values can be interpreted as maximum-likelihood estimates, if the stochastic interpretation of the Leser method proposed by Schlicht (5) is adopted, and the smoothing constant may be estimated by the method given there. In short, the method is more systematically linked to the smoothing method at hand than other methods of adjustment and interpolation are. Acknowledgements I thank an anonymous referee of this journal for very helpful comments and for suggesting to consider the issue of break point location. References Leser, C. E. V. (191). A simple method of trend construction, Journal of the Royal Statistical Society, Series B (Methodological), 3, 91 7. Ludsteck, J. (). HPFilter, Mathematica package, Wolfram Research, http://library. wolfram.com/infocenter/mathsource/511/. Schlicht, E.(191). A seasonal adjustment principle and a seasonal adjustment method derived from this principle, Journal of the American Statistical Association, 7, 37 37, http://www.semverteilung.vwl.uni-muenchen.de/mitarbeiter/es/paper/schlicht-seasonal adjustment.pdf. Schlicht, E. (5). Estimating the smoothing constant in the so-called Hodrick-Prescott filter, Journal of the Japan Statistical Society, 35, 1 19, http://www.scipress.org/journals/jjss/ pdf/3501/350199.pdf.