All/DATA.zip DATA/Effective Federal Funds Rate.csv DATE,BOGZ1FL072052006A XXXXXXXXXX,8.38 XXXXXXXXXX,8.27 XXXXXXXXXX,6.91 XXXXXXXXXX,6.77 XXXXXXXXXX,8.76 XXXXXXXXXX,8.45 XXXXXXXXXX,7.31...

advanced econometrics - time series. you can use Matlab / R/ Stata


All/DATA.zip DATA/Effective Federal Funds Rate.csv DATE,BOGZ1FL072052006A 1984-01-01,8.38 1985-01-01,8.27 1986-01-01,6.91 1987-01-01,6.77 1988-01-01,8.76 1989-01-01,8.45 1990-01-01,7.31 1991-01-01,4.43 1992-01-01,2.92 1993-01-01,2.96 1994-01-01,5.45 1995-01-01,5.6 1996-01-01,5.29 1997-01-01,5.5 1998-01-01,4.68 1999-01-01,5.3 2000-01-01,6.4 2001-01-01,1.82 2002-01-01,1.24 2003-01-01,0.98 2004-01-01,2.16 2005-01-01,4.16 2006-01-01,5.24 2007-01-01,4.24 2008-01-01,0.16 2009-01-01,0.12 2010-01-01,0.18 2011-01-01,0.07 2012-01-01,0.16 2013-01-01,0.09 __MACOSX/DATA/._Effective Federal Funds Rate.csv DATA/Inflation.csv DATE,FPCPITOTLZGUSA 1984-01-01,4.30053547523427 1985-01-01,3.54564415209369 1986-01-01,1.89804772234275 1987-01-01,3.66456321751691 1988-01-01,4.07774110744408 1989-01-01,4.82700303008949 1990-01-01,5.39795643990322 1991-01-01,4.23496396453853 1992-01-01,3.0288196781497 1993-01-01,2.95165696638554 1994-01-01,2.6074415921546 1995-01-01,2.80541968853655 1996-01-01,2.9312041999344 1997-01-01,2.33768993730741 1998-01-01,1.55227909874362 1999-01-01,2.18802719697358 2000-01-01,3.37685727149935 2001-01-01,2.82617111885402 2002-01-01,1.58603162650603 2003-01-01,2.27009497336113 2004-01-01,2.67723669309173 2005-01-01,3.39274684549547 2006-01-01,3.22594410070407 2007-01-01,2.85267248150136 2008-01-01,3.83910029665101 2009-01-01,-0.35554626629975 2010-01-01,1.64004344238989 2011-01-01,3.15684156862206 2012-01-01,2.06933726526059 2013-01-01,1.46483265562714 __MACOSX/DATA/._Inflation.csv DATA/US_REAL_GDP.csv DATE,A191RL1A225NBEA 1984-01-01,7.2 1985-01-01,4.2 1986-01-01,3.5 1987-01-01,3.5 1988-01-01,4.2 1989-01-01,3.7 1990-01-01,1.9 1991-01-01,-0.1 1992-01-01,3.5 1993-01-01,2.8 1994-01-01,4 1995-01-01,2.7 1996-01-01,3.8 1997-01-01,4.4 1998-01-01,4.5 1999-01-01,4.8 2000-01-01,4.1 2001-01-01,1 2002-01-01,1.7 2003-01-01,2.9 2004-01-01,3.8 2005-01-01,3.5 2006-01-01,2.9 2007-01-01,1.9 2008-01-01,-0.1 2009-01-01,-2.5 2010-01-01,2.6 2011-01-01,1.6 2012-01-01,2.2 2013-01-01,1.8 __MACOSX/DATA/._US_REAL_GDP.csv __MACOSX/All/._DATA.zip All/Questions.pdf Economics 272 Luigi Bocola Intermediate Econometrics Spring 2020 Empirical Exercise Estimating the New Keynesian model: Consider the equilibrium conditions of the plain- vanilla New Keynesian model with Rotemberg (1982) price adjustment costs 1 1 + it = βEt [ eθt+1 eĉt−ĉt+1 1 + πt+1 ] (1) eŷt = eĉt + κ 2 ( πt − π∗ 1 + π∗ )2 (2) πt − π∗ 1 + π∗ 1 + πt 1 + π∗ = 1 κ(µ− 1) e ŷt ( µem̂ct − 1 ) + βEt [ eθt+1eĉt−ĉt+1 πt+1 − π∗ 1 + π∗ 1 + πt+1 1 + π∗ ] (3) em̂ct = 1 ezt χeŷt eĉt (4) 1 + it = ( 1 + π∗ β )1−ρi (1 + it−1)ρi ( 1 + πt 1 + π∗ )ψπ eεm,t (5) θt+1 = ρθθt + σθεθ,t+1 (6) zt+1 = ρzzt + σzεz,t+1, (7) where ĉt is the log of aggregate consumption, ŷt is the log of aggregate output, πt is the inflation rate, it is the nominal interest rate, m̂ct is the log of the marginal cost for the firms. To give you some context, equation (1) is the Euler equation for nominal bonds, equation (2) is the resource constraint, equation (3) is the New Keyesian Phillips curve, equation (4) is the definition of the marginal cost, and equation (5) is the Taylor rule. The exogenous processes in the model are the technology shock zt, the monetary shock εm,t and the preference shock θt. We assume that the innovations are zero-mean Gaussian iid random variables, and denote by [σz, σm, σθ] their standard deviations. In the above system, the control variables are [ĉt, ŷt, m̂ct, πt] while the state variables are [it−1, θt, zt, εm,t]. The structural parameters of the model are [µ, χ, β, π∗, κ, ψπ, ρi, ρθ, ρz, σθ, σz, σm]. In what follows, we will set the gross markup of the firms, µ, to 1.2 and the disutility of 1 labor for the representative household, χ, to 1/µ. You can verify that, given this restriction, the steady state value for the variables are given by ŷss = ĉss = 0 m̂css = log(1/µ) πss = π∗ iss = (1 + π∗)/β− 1. In addition, we set the target for annual inflation at 2%, π∗ = 0.02, and set β = 0.98, in order to obtain an annual risk-free rate of roughly 2% on average. The question asks you to use U.S. data and a linear approximation of the policy func- tions of the model to estimate the remaining parameters: the parameter governing the strength of price adjustment costs, κ; the parameters of the Taylor rule [ψπ, ρi]; the param- eters governing the shock processes, [ρθ, ρz, σθ, σz, σm]. We collect these parameters in the vector φ. Objective questions: 1. Download from FRED annual time series for U.S. real gross domestic product, infla- tion (annual percentage change in the GDP deflator), and the effective federal funds rate for the period 1984-2012. Take the log of real GDP and estimate by OLS the linear regression yt = α + βt + et. The residual et is the data counterpart to ŷt, inflation is the data counterpart to πt and the effective fed funds rate is the data counterpart of it.1 We denote by Yt = [ŷt, it, πt]. Plot the three series and provide a set of statistics that summarize their persistence and cross-correlation patterns. 2. Write the state-space representation for Yt implied by the model and explain the steps necessary to evaluate the likelihood function L(YT|φ). Modify the set of codes for the RBC model that I have posted on Canvas to numeri- cally evaluate L(YT|φ) for a given φ. 1Be careful here, it is the net nominal interest rate. So, an annual interest rate of 4% corresponds to 0.04. Same for πt. 2 3. Choose a prior for φ and sample 200000 draws using the Metropolis Hastings algo- rithm we have seen in class. Report a Table with posterior statistics for the model parameters, as well as measures of in-sample fit. 4. Generate a plot with the posterior mean and 90% pointwise credible set for the impulse response functions of output, nominal interest rates and inflation to the discount factor shock and the technology shock. What are the key differences in terms of signs? 5. Fix the parameter vector at the posterior mean. What fraction of the variation in output, nominal interest rates and inflation is explained by technology shocks? What fraction is explained by the preference shock? Subjective question: 1. An important macroeconomic trend of the past 15 years has been a secular decline in the real interest rates.2 A branch of the literature attributes this trend to an increase in the propensity to save of the private sector, due to demographics trends and higher un-insurable risk. The “preference shock” θt can capture this trend in reduced form.3 Use the estimated model to provide evidence for this trend, and to assess this possible explanation. You can be creative here, and use all the tools that we have studied in class. 2. You have heard in a seminar that the plain-vanilla New Keynesian model has hard time fitting simultaneously the persistence of inflation and the correlation between the nominal interest rate and inflation. Is this statement true? Please, use the tools we have developed in class to corroborate your answer. If the statement is true, can you explain why? 2You can define the real interest rate is the model as rt = it −Et[πt+1]. 3That is, an increase in θt makes the representative agent more “patient”, inducing a decline in current consumption for a given level of the real interest rate. 3 __MACOSX/All/._Questions.pdf All/tips.pdf ECON 272 Part 2: Empirical Exercise Tips Shumpei Goke May 21, 2020 1 Structure of Codes If your codes are not working, please watch the recording of last week’s review session, and keep the following in mind: • The file model.m must define all state variables in the model in the variable x and all control vari- ables in the variable y. The corresponding values next period must be in xp and yp, respectively. Make sure the variables are defined in the same order between x and xp, and between y and yp. • You can find how the state space representation is defined in kalman.m: ssst = Φssst−1 +Reeet , eeet ∼N (0,Se), (STA) yyyt = A+Bssst +uuut , uuut ∼N (0,H). (OBS) The Kalman filter (especially kalman.m) takes in data of yyyt and outputs the likelihood function. That is, your yyyt that is fed into kalman.m must contain all variables for which you have data, and nothing else. – There seems to be some confusion about y in model.m and yt in (STA) (sysmat.m, kalman.m). They don’t have to be the same. The y in model.m must be control variables under the NK model; but yt in (STA) can be anything that can be represented using the state variables, as long as you have data for them. It’s perfectly fine to have it inside yt in (STA) – that’s a function of the state variables! You also have to keep the order of variables in yyyt same as the order of variables in the data (data.m). So, if your data (T × 3) has yt (GDP) in the first column, it in the second column and πt in the second column, yyyt must be (yt , it ,πt)′. How do you change the order of variables in yyyt? You change B in sysmat.m. Keep reading. • The function model_solution (in model_solution.m) will give two matrices, gx and hx. – The matrix hx is the matrix for linear approximation of xp as a function of x near the steady state of x (xp and x are as defined in model.m). Note that the order of xp and x defined in model.m are preserved: If, say, you defined x=[a b c], and xp as its corresponding values tomorrow, then hx= ηaa ηab ηacηba ηbb ηbc ηca ηcb ηcc , so that xp≈ hx ab c . 1 – Similarly, the matrix gx is the matrix for linear approximation of y as a function of x near the steady state of x on the input side and near the steady state of y on the output side (y and x are as defined in model.m). So if you have x=[a b c] and y=[d e], then gx =[ ηda ηdb ηdc ηea ηeb ηec ] . • You need to define B (B in the equation (OBS) above) in sysmat.m so that (i) each row of B cor- responds to each yyyt (each variable for which you have data) and (ii) each column of B corresponds to each state variable. This basically means picking up the right subset of rows from gx and hx in the right order. (This is something I wanted to nail down during the review session.) • Please also note that (STA) implies ssst is mean zero (at least in the long run, if all eigenvalues of
May 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here