national autonomous university of mexico f aculty of economics 2013 mexican stata users group...

19
NATIONAL AUTONOMOUS UNIVERSITY OF MEXICO Faculty of Economics 2013 Mexican Stata Users Group Meeting “The alternative of a smoother parameter in the Hodrick-Prescott filter” Speaker: Miguel Ángel Ramírez Hernández

Upload: gaston

Post on 25-Feb-2016

45 views

Category:

Documents


1 download

DESCRIPTION

National Autonomous University of Mexico f aculty of Economics 2013 Mexican Stata Users Group Meeting. “ The alternative of a smoother parameter in the Hodrick -Prescott filter ”. Speaker: Miguel Ángel Ramírez Hernández. Exposure lines. - PowerPoint PPT Presentation

TRANSCRIPT

Page 2: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 2

Exposure lines

Time Series: Retrospective, definition and components.

The Hodrick-Prescott filter (1997) and criticism of the smoothing parameter (λ).

Proposal, simulation and empirical evidence.

References.

Page 3: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 3

“Every kind of periodic fluctuation, whether daily,

weekly, monthly, quarterly, or yearly, must be detected and exhibited, not only as a

subject of study in itself, but because we must ascertain and eliminate such periodic

variations before we can correctly exhibit those which are irregular or non-periodic,

and probably of more interest importance”1

William Stanley Jevons1862

1Jevons, W.S. (1884). Investigations in currency and finance. London: Macmillan and Co. page 4.

Page 4: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 4

Time Series: Retrospective, definition and components.

In the half nineteenth century: W. S. Jevons (1862) pioneered the analysis of time series.

Early twentieth century Hooker (1901): Concept trend.

First half of the twentieth century  Study of business cycles:Kitchin (1923) and Frickey (1934).

 Formalizing cyclic models:Kuznets (1929); Frisch (1933); Samuelson (1939); Kaldor (1940); Metzler (1941) and Tinbergen (1939.1940, 1942).

1950-1960: period of "steady state" in the level intellectual of cycles.

Page 5: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 5

1970-1980: early distinction of economic cycles, growth cycles and political-economic cycles, Nordhaus (1975).

Simultaneously, Lucas (1975) with notable differences: General Economic Cycle (GEC).

From GEC were raised derivations with rational expectation. Development of "RBC“ models.Kydland-Prescott (1982): prototype RBCLong and Plosser (1983).

1980-1990: special interest in time series decomposition: trend-cycle.

Harvey (1985) and Hodrick-Prescott (1997). Extensive use in RBC models.

Page 6: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 6

Time series definitionProbability space: “y” is a random variable, real function defined in

such that for every real number “a”Thus, for each “a”:

Therefore, a random vector or vector of random variables of dimension K is a function “y" of in Euclidean space Rk

),,( P

awywAa )(|

)()(0,1R:

aAPaFF

kka

kk

k

cwyawywARaaa

wywywy

)(|,...,)(|)´,...,(

,...,

11

1

1

Page 7: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 7

Distribution function “y”

Assuming an index set Z that contains non-negative integers, discrete stochastic process is a real function:

Generally, the random variable corresponding to "t" is denoted as {yt}.

Finally, a time series is defined as an underlying stochastic process embodiment and whose order performs to equidistant frequency.

)()(

0,1R: k

aAPaFF

R : Zy),( Z,t wty

Page 8: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 8

Classic Components of a time series.

Persons (1919) identified four components of the time series:

1) A long-term development (trend).

2) A cyclical component with periods longer than t +1 (cycle).

3) A component that contains fluctuations up and down within a year (seasonal cycle / seasonal).

4) A component excluding movements in 1), 2) and 3). (residual / irregular/random element).

Page 9: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 9

The Hodrick-Prescott filter (HP) and criticism to smoothing parameter (λ)

Define a time series yt as the sum of a component of "growth" and a cyclical component :

Optimization process particular: minimizing the variance of cyclical component and the variance of trend "second difference of serie".

Smoothing parameter: λ

Ttcgy ttt ,..3,2,1for

2

1211

1

2 )(min1

T

ttttt

T

tt

gggggc

Ttt

22

21

Source: Authors' calculations based on Hodrick and Prescott (1997).

Page 10: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 10

The evidence and relevance of λ smoothing factors that suggest the authors to annual data is 100 and 1600 for quarterly data.

However, the parameter λ has a number of inconsistencies outlined mainly by Cogley and Nason (1995); Guay, ST-Amant (2005).

Reviews: 1. The trend and cycle components present deviations

prominent when the estimator λ is not consistent.2. Real Cycles Spurious, derivatives of overidentifying in

the order of time series.3. Variance and trend cycle series are particular; assume a

priori smoothing factors can disturb inferences, for example, the unemployment rate and the natural rate estimates by the HP filter.

Page 11: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 11

Proposal, simulation and empirical evidence.i. Proposal: Promptly identify the order of

integration of the trend and proceed to use the corresponding variance.

ii. Consider and weight the factor λ by a coefficient inverse of "angular frequency".

Where: 22

21af

1

Taf

Page 12: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 12

Matrix estimationIn terms of Hodrick-Prescott (1997)

If the smoothing parameter is non-negative, i.e. λ> 0, the breakdown of the series is obtained by minimizing the weighted sum of squares with respect to :

Note: Stata incorporates hprescott command.

ttt cgy T

Tt

TtTt

Rc

Rg

Ryyyyy

),,...,,( 21

tytg

TR

ggy

222

Page 13: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 13

The unique solution of the minimization is defined as:

Where denotes a particular matrix, dimension and “I” denotes the identity matrix.

yZZIyg 1´,

Z TT 2

121......0..................0...12100......121

:2 TTZ

Page 14: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 14

Simulation in StataStep 1: Define the matrix Z.

mkmat … … … …, matrix(Z)mat list Z

Step 2: Estimate the transpose of Z.matrix Z´=Z’

mat list Z’Step 3: Define the identity matrix I.

mkmat … … …, matrix(identity)mat list identity

Step 4: Multiply the transpose matrix Z by matrix Z.matrix Z´Z=Z’*Z

Step 5: Estimate the smoothing parameter λ and multiply this scalar by the result of the matrix obtained in Step 4.

matrix lambdaZ´Z= λ *Z´Z

Page 15: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 15

Step 6: The result obtained in step 5, add the identity matrix.

matrix lambdaZ´Z+I=identity+lambdaZ´Z mat list lambdaZ´Z+I

Step 7: Estimate inverse of the resulting matrix in step 6.matrix inversalambdaZ´Z+I=invsym(lambdaZ´Z+I)

Step 8: Enter the time seriesmkmat serie

matlistStep 9: Finally multiply the vector of the time series

estimated by the matrix in step 7.

Outcome: Trend of the time series.

Note: The cycle component is obtained by subtracting the trend component in original time series.

Page 16: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 16

Empirical evidence I extracted the real effective exchange rate

of Norway (REER) for a quarterly period 1980-I to 2008-III.

Objective: To analyze the changes in the balance of goods and non-factor services. (REER-proxy).

Page 17: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 17

Norway: real effective exchange rate and HP filters with variations in the smoothing parameter, 1980-I to

2008-III.

Source: Authors' calculations based on IMF and Central Bank of Norway (2013).

Simulated data in Stata.

4.5

4.55

4.6

4.65

1980-1 1990-1 2000-1 2010-1

Serie LTCR lambda=1600

lambda=13.08159669 lambda=239.4300893

Alternative proposal

Page 18: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 18

Referenceso Cogley, T. and Nason, J.M. (1995), “Effects of the Hodrick–Prescott filter on

trend and difference stationary time series. Implications for business cycle research”, Journal of Economic Dynamics and Control, 19, 253–278.

o Frickey, E. (1934), “The problem of secular trend”, Review of Economics and Statistics, 16, 199–206.

o Frisch, R. (1933), “Propagation problems and impulse problems in dynamic economics”, in Economic Essays in Honour of Gustav Cassel, London: George Allen & Unwin, 171–205.

o Guay, A. y St.-Amant, P. (2005). “Do the Hodrick-Prescott and Baxter-King Filters Provide a Good Approximation of BusinessCycles. Annals of Economics and Statistics / Annales d”Économie et de Statistique, 77,133-155.

o Harvey, A.C. (1985), “Trends and cycles in macroeconomic time series”, Journal of Business and Economic Statistics, 3, 216–227.

o Hodrick, R.J. and Prescott, E.C. (1997). “Postwar US business cycles: an empirical investigation”, Journal of Money, Credit and Banking, 29, 1–16.

o Hooker, R.H. (1901), “Correlation of the marriage rate with trade”, Journal of the Royal Statistical Society, 64, 485–503.

o Kaldor, N. (1940), “A model of the trade cycle”, Economic Journal, 50, 78–92.o Kitchin, J. (1923), “Cycles and trends in economic factors”, Review of

Economics and Statistics, 5, 10–16.o Kuznets, S. (1929), “Random events and cyclical oscillations”, Journal of the

American Statistical Association, 24, 258–275. Continue…

Page 19: National Autonomous University of Mexico  f aculty  of  Economics 2013 Mexican  Stata  Users Group Meeting

Miguel Ángel Ramírez Hernández 19

o Kydland, F.E. and Prescott, E.C. (1982), “Time to build and aggregate fluctuations”, Econometrica, 50, 1345–1370.

o Jevons, W.S. (1884). Investigations in currency and finance. London: Macmillan and Co. page 4.

o Long, J.B. and Plosser, C.I. (1983), “Real business cycles”, Journal of Political Economy, 91, 39–69.

o Lucas, R.E. (1975), “An equilibrium model of the business cycle”, Journal of Political Economy, 83, 1113–1144.

o Metzler, L.A. (1941), “The nature and stability of inventory cycles”, Review of Economics and Statistics, 23, 113–129.

o Nordhaus, W.D. (1975), “The political business cycle”, Review of Economic Studies, 42, 169–190.

o Persons, W.M. Indices of Business Conditions, Review of Economic Statistics (1919), pp. 5 – 107.

o Samuelson, P.A. (1939), “Interactions between the multiplier analysis and the principle of the accelerator”, Review of Economics and Statistics, 21, 75–78.

o Tinbergen, J. (1939b), Statistical Testing of Business-Cycle Theories, Volume 1I: Business Cycles in the United States of America, Geneva: League of Nations.

o Tinbergen, J. (1940), “On a method of statistical business-cycle research. A reply”, Economic Journal, 50, 141–154.

o Tinbergen, J. (1942), “Critical remarks on some business-cycle theories”, Econometrica, 10, 129–146.