Skip to main content
Log in

Tractable Latent State Filtering for Non-Linear DSGE Models Using a Second-Order Approximation and Pruning

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

This paper develops a novel approach for estimating latent state variables of Dynamic Stochastic General Equilibrium (DSGE) models that are solved using a second-order accurate approximation. I apply the Kalman filter to a state-space representation of the second-order solution based on the ‘pruning’ scheme of Kim et al. (J Econ Dyn Control 32:3397–3414, 2008). By contrast to particle filters, no stochastic simulations are needed for the deterministic filter here; the present method is thus much faster; in terms of estimation accuracy for latent states it is competitive with the standard particle filter. Use of the pruning scheme distinguishes the filter here from the deterministic Quadratic Kalman filter presented by Ivashchenko (Comput Econ, 43:71–82, 2014). The filter here performs well even in models with big shocks and high curvature.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Notes

  1. See Fernández-Villaverde and Rubio-Ramírez (2007) and An and Schorfheide (2007) for early applications.

  2. The literature has discussed ‘Extended Kalman filters’, i.e. Kalman filters applied to linear approximations of non-linear models; e.g., Harvey (1989).

  3. One-step-ahead moments in the QKF are derived under the assumption that estimation error of filtered states is Gaussian. The filter here does not require that assumption. Ivashchenko (2014) also applies two other deterministic filters to second-order approximated DSGE models: a Central Difference Kalman filter (Norgaard et al. 2000) and an Unscented Kalman filter (Julier and Uhlmann 2004); these filters are based on different deterministic numerical integration schemes for computing one-step-ahead conditional moments (no analytical closed-form expressions). Andreasen (2012) estimates a DSGE model using a Central Difference Kalman filter.

  4. For a square matrix \(M\), vech (\(M\)) is the column vector obtained by vertically stacking the elements of \(M\) that are on or below the main diagonal.

  5. \(\omega _t =\omega _t^{(1)} +R^{(2)}\) where \(R^{(n)}\) contains terms of order \(n\) or higher in deviations from steady state. Let \(\omega _t^i \) and \(\omega _t^{(1),i} \) be the \(i\)-th elements of \(\omega _t \) and \(\omega _t^{(1)}\), respectively. Note that \(\omega _t^i \omega _t^j =(\omega _t^{(1),i} +R^{(2)})(\omega _t^{(1),j} +R^{(2)})=\omega _t^{(1),i} \omega _t^{(1),j} +\omega _t^{(1),i} R^{(2)}+\omega _t^{(1),j} R^{(2)}+ R^{(4)};\) thus, \(\omega _t^i \omega _t^j =\omega _t^{(1),i} \omega _t^{(1),j} +R^{(3)}\). Up to \(2^\mathrm{nd}\) order accuracy, \(\omega _t^i \omega _t^j =\omega _t^{(1),i} \omega _t^{(1),j} \) and \(P(\omega _t )=P(\omega _t^{(1)} )\) holds thus. By the same logic, \(\omega _t \!\otimes \! \varepsilon _{t+1} =\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} \) holds to \(2^\mathrm{nd}\) order accuracy. See Kollmann (2004) and Lombardo and Sutherland (2007).

  6. Aruoba et al. (2012) estimate a pruned univariate quadratic time series model, using particle filter methods. These authors discard the term that is quadratic in \(\varepsilon _{t+1} \) on the right-hand side of (4). By contrast, the paper here allows for non-zero coefficients on second-order terms in \(\varepsilon _{t+1}\), and it develops a deterministic filter that can be applied to multivariate models.

  7. Linear updating rules are likewise assumed by Andreasen (2012) and Ivashchenko (2014) who also develop deterministic filters for second-order approximated DSGE models (see above).

  8. It is assumed that the inverse of \(\Gamma V_{t+1,t}^Z \Gamma +\Sigma _\psi \) (covariance matrix of prediction errors of observables) exists. A sufficient condition for this is that \(\Sigma _\psi \) is positive definite, as assumed in the numerical experiments below.

  9. Recall that the observable \(y_{t+1} \) is a linear function of \(Z_{t+1} \) [see (7)]; this may help to explain the good performance of the linear updating rule.

  10. The relative size of the TFP and taste shocks assumed here (i.e. \(\sigma _\theta \) 20-times larger than \(\sigma _\psi )\) ensures that each shock accounts for a non-negligible share of the variance of the endogenous variables; see below.

  11. The statistics in Table 1 are shown for variables without measurement error. The ranking of volatilities generated by the two approximations and shocks is not affected by the presence of measurement error.

  12. HP filtered variables are markedly less volatile than non-HP filtered variables; however, volatility remains much higher under the second-order approximation than under the linear approximation, in the ‘big shocks’ variant. E.g. the standard dev. of HP filtered GDP is 47 % (23 %) under the second- (first-) order approximation.

  13. I apply KalmanL to de-meaned series, as the linearized model implies that the unconditional mean of state variables, expressed as differences from steady state, is zero, while variables generated from the second-order model have a non-zero mean. The initial particles used for the particle filter are drawn from a multi-variate normal distribution whose mean and variance are set to unconditional moments of the state vector.

  14. I also computed median absolute errors (MAEs) for the filtered series. The results (available on request) confirm the greater accuracy of the KalmanQ filter.

  15. Once the QKF filtered estimates of the second-order accurate state variables \(\omega _{t,t} \) reach large values, the one-step ahead covariance matrix \(V_{t+1,t}^\omega \) takes huge values too (in the QKF, \(V_{t+1,t}^\omega \) depends on \(\omega _{t,t} );\) at that point the observations are no longer able to correct the filtered series, and the filtered series may start to diverge explosively.

  16. For the unpruned ‘small shocks’ sample paths, the KalmanQ filter and the QKF thus have similar performance; with T\(=\)100 [T\(=\)500], the KalmanQ filter is more accurate (across all variables) than the QKF in about 45 % [54 %] of the simulation runs.

  17. A more detailed evaluation of the small sample properties of the QML estimator is left for future research.

  18. \(\Sigma _\varepsilon =(.01)^{2}I_m ;\Sigma _\psi =(.01)^{2}I_{n_y } \). As before, the parameter \(\xi \) that scales the size of the shocks is normalized as \(\xi =1\).

  19. For each simulation run, the standard deviation of each element of \(\omega _t \) and \(\omega _t^{(1)} \) was computed; then, standard deviations were averaged across variables and coefficient draws, for each of the four model classes (medium/small models with strong/weak curvature).

  20. I also examined filter performance using unpruned sample paths generated by the state equations with randomly drawn coefficients (results available in request). All ‘strong curvature’ model variants generated exploding unpruned sample paths. In the ‘weak curvature’ model variants, none of the unpruned sample paths exploded—pruned and unpruned sample paths were highly correlated; the QKF and KalmanQ filter showed similar performance.

References

  • An, S., & Schorfheide, F. (2007). Bayesian analysis of DSGE models. Econometric Reviews, 26, 113–172.

    Article  Google Scholar 

  • Andreasen, M. (2012). Non-linear DSGE models and the central difference Kalman filter. Journal of Applied Econometrics, 28, 929–955.

    Google Scholar 

  • Andreasen, M., Fernández-Villaverde, J., & Rubio-Ramírez, J. (2013). The pruned state-space system for non-linear DSGE models: Theory and empirical applications. NBER Working Paper No. 18983.

  • Aruoba, S., Bocola, L., & Schorfheide, F. (2012). A new class of nonlinear time series models for the evaluation of DSGE models. Working Paper, University of Maryland and University of Pennsylvania.

  • Collard, F., & Juillard, M. (2001). Perturbation methods for rational expectations models. Working Paper, GREMAQ and CEPREMAP.

  • Del Negro, M., & Schorfheide, F. (2011). Bayesian macroeconometrics. In J. Geweke, G. Koop, & H. van Dijk (Eds.), The Oxford handbook of Bayesian econometrics (pp. 293–389). Oxford: Oxford University Press.

  • Fernández-Villaverde, J., & Rubio-Ramírez, J. (2007). Estimating macroeconomic models: A likelihood approach. Review of Economic Studies, 74, 1059–1087.

    Article  Google Scholar 

  • Hamilton, J. (1994). Time series analysis. Princeton: Princeton University Press.

    Google Scholar 

  • Harvey, A. (1989). Forecasting-structural time series models and the Kalman filter. Cambridge: Cambridge University.

    Google Scholar 

  • Ivashchenko, S. (2014). DSGE model estimation on the basis of second-order approximation. Computational Economics, 43, 71–82

    Google Scholar 

  • Jin, H., & Judd, K. (2000). Applying PertSolv to complete market RBC models. Working paper, Stanford University.

  • Julier, S., & Uhlmann, J. (2004). Unscented filtering and nonlinear estimation. Proceedings of the IEEE, 92, 401–422.

    Article  Google Scholar 

  • Kim, J., Kim, S., Schaumburg, E. & Sims, C. (2008). Calculating and using second-order accurate solutions of discrete-time dynamic equilibrium models. Journal of Economic Dynamics and Control, 32, 3397–3414.

    Google Scholar 

  • Kollmann, R. (1996). Incomplete asset markets and the cross-country consumption correlation puzzle. Journal of Economic Dynamics and Control, 20, 945–962.

    Article  Google Scholar 

  • Kollmann, R. (2002). Monetary policy rules in the open economy: Effects of welfare and business cycles. Journal of Monetary Economics, 49, 989–1015.

    Article  Google Scholar 

  • Kollmann, R. (2004). Solving non-linear rational expectations models: Approximations based on Taylor expansions. Working Paper, University of Paris XII.

  • Kollmann, R., Kim, S., & Kim, J. (2011). Solving the multi-country real business cycle model using a perturbation method. Journal of Economic Dynamics and Control, 35, 203–206.

    Google Scholar 

  • Lombardo, G., & Sutherland, A. (2007). Computing second-order accurate solutions for rational expectation models using linear solution methods. Journal of Economic Dynamics and Control, 31, 515–530.

    Article  Google Scholar 

  • Norgaard, M., Poulsen, N., & Ravn, O. (2000). New developments in state estimation for nonlinear systems. Automatica, 36, 1627–1638.

    Article  Google Scholar 

  • Schmitt-Grohé, S., & Uribe, M. (2004). Solving dynamic general equilibrium models using a second-order approximation to the policy function. Journal of Economic Dynamics and Control, 28, 755–775.

    Article  Google Scholar 

  • Sims, C. (2000). Second order accurate solution of discrete time dynamic equilibrium models. Working Paper, Economics Department, Princeton University.

  • Smets, F., & Wouters, R. (2007). Shocks and Frictions in US business cycles: A Bayesian DSGE approach. American Economic Review, 97, 586–660.

    Article  Google Scholar 

  • Triantafyllopoulos, K. (2002). Moments and cumulants of the multivariate real and complex Gaussian distributions. Working Paper, University of Bristol.

Download references

Acknowledgments

I am very grateful to three anonymous referees for detailed and constructive comments. I also thank Martin Andreasen, Sergey Ivashchenko, Jinill Kim and Raf Wouters for useful discussions. Financial support from the National Bank of Belgium and from ’Action de recherche concertée’ ARC-AUWB/2010-15/ULB-11 is gratefully acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robert Kollmann.

Appendices

Appendix: Computing Moments of the State Vector (for KalmanQ Filter Formula)

The unconditional mean and variance of the state vector \(Z_{t+1}\) of the augmented state equation (5) are given by: \(E(Z_{t+1} )=(I-G_1 )^{-1}G_0 \) and \(V(Z_{t+1} )=G_1 V(Z_{t+1} )G_1^ {\prime }+V(u_{t+1} )\), respectively. Stationarity of \(Z_{t+1} \) (which holds under the assumption that all eigenvalues of \(F_1 \) are strictly inside the unit circle) implies \(E(Z_{t+1} )=E(Z_t ),\,V(Z_{t+1} )=V(Z_t )\). Once \(V(u_{t+1} )\) has been determined, \(V(Z_{t+1} )\) can efficiently be computed using a doubling algorithm. Note that \(\omega _t^{(1)} =\sum _{i=0}^\infty {(F_1)^{i}F_2 \varepsilon _{t-i} }\) and recall that

$$\begin{aligned} u_{t+1} \equiv G_2 \varepsilon _{t+1} +G_{12} \omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} +G_{22} [P(\varepsilon _{t+1} )-E(P(\varepsilon _{t+1} ))]. \end{aligned}$$
(A.1)

\(E(\omega _t^{(1)} )=0\), \(E(\omega _t^{(1)} \otimes \varepsilon _{t+1} )=0\), \(E((\omega _t^{(1)} \otimes \varepsilon _{t+1} )\varepsilon _{t+1}^{\prime })=0\), \(E((\omega _t^{(1)} \otimes \varepsilon _{t+1} )P(\varepsilon _{t+1})^{\prime })=0\) hold as \(\varepsilon _{t+1} \) has mean zero and is serially independent. Hence, the covariances between the first and second right-hand side (rhs) terms in (A.1), and between the second and third rhs terms are zero. \(\varepsilon _t \sim N(0,\Sigma _\varepsilon )\) implies that the unconditional mean of all third order products of elements of \(\varepsilon _{t+1} \) is zero (Isserlis’ theorem): \(E\varepsilon _{t+1}^i \varepsilon _{t+1}^j \varepsilon _t^k =0\) for all \(i,\,j,\,k=1,\ldots ,\hbox {m}\), where \(\varepsilon _{t+1}^h \) is the \(h\)-th element of \(\varepsilon _{t+1} \). Thus the covariance between the first and third rhs terms in (A.1) too is zero. Note that \(V(\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} )=V(\omega _t^{(1)} )\!\otimes \! \Sigma _\varepsilon , \) with \(V(\omega _t^{(1)} )=F_1 V(\omega _t^{(1)} )F_1^{\prime }+F_2 \Sigma _\varepsilon F_2^{\prime }\). Thus,

$$\begin{aligned} V(u_{t+1} )=G_2 \Sigma _\varepsilon G_2^{\prime }+G_{12} (V(\omega _t^{(1)} )\!\otimes \! \Sigma _\varepsilon )G_{12}^ {\prime }+G_{22} V(P(\varepsilon _{t+1} ))G_{22}^{\prime }. \end{aligned}$$

\(\varepsilon _t \sim N(0,\Sigma _\varepsilon )\) also implies that the covariance between \(\varepsilon _{t+1}^i \varepsilon _{t+1}^j \) and \(\varepsilon _{t+1}^r \varepsilon _{t+1}^s \) is

$$\begin{aligned} Cov(\varepsilon _{t+1}^i \varepsilon _{t+1}^j, \varepsilon _{t+1}^r \varepsilon _{t+1}^s ) = \sigma _{i,r} \sigma _{j,s} +\sigma _{i,s} \sigma _{j,r} \hbox {for i,j,r,s}=1,\,\ldots ,\,\hbox {m}, \end{aligned}$$

where \(\sigma _{i,r} =E(\varepsilon _{t+1}^i \varepsilon _{t+1}^r )\). (See, e.g., Triantafyllopoulos 2002). This formula allows to compute \(V(P(\varepsilon _{t+1} ))\), the covariance matrix of the vector

$$\begin{aligned} P(\varepsilon _{t+1} )&\equiv (\varepsilon _{t+1}^1 \varepsilon _{t+1}^1, \varepsilon _{t+1}^1 \varepsilon _{t+1}^2, \ldots ,\varepsilon _{t+1}^1 \varepsilon _{t+1}^m, \varepsilon _{t+1}^2 \varepsilon _{t+1}^2, \ldots ,\varepsilon _{t+1}^2 \varepsilon _{t+1}^m,\ldots , \\&\varepsilon _{t+1}^{m-1} \varepsilon _{t+1}^{m-1}, \varepsilon _{t+1}^{m-1} \varepsilon _{t+1}^m, \varepsilon _{t+1}^m \varepsilon _{t+1}^m ). \end{aligned}$$

Conditional Variance of State-Space Disturbance

To derive the formula for the conditional variance of \(u_{t+1} \) [(10) in main text] these facts are used:

  1. (i)

    \(E((\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} )\varepsilon _{t+1}^{\prime }|\Upsilon ^{t})=\omega _{t,t}^{(1)} \!\otimes \! \Sigma _\varepsilon , \) with \(\omega _{t,t}^{(1)} \equiv E(\omega _t^{(1)} |\Upsilon ^{t})\).

  2. (ii)

    \(E((\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} )(\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} )^{\prime }|\Upsilon ^{t})=E((\omega _t^{(1)} \omega _t^{{(1)}{\prime }})\!\otimes \! (\varepsilon _{t+1} \varepsilon _{t+1}^{\prime })|\Upsilon ^{t})=E((\omega _t^{(1)} \omega _t^{{(1)}{\prime }})|\Upsilon ^{t})\!\otimes \! \Sigma _\varepsilon =(V_{t,t}^{{\omega ^{(1)}}} +\omega _{t,t}^{(1)} \omega _{t,t}^{(1)}{\prime })\!\otimes \! \Sigma _\varepsilon \). (Note that \(V_{t,t}^{\omega ^{{(1)}}} =E(\omega _t^{(1)} \omega _t^{(1){\prime }}|\Upsilon ^{t})-E(\omega _t^{(1)} |\Upsilon ^{t})E(\omega _t^{(1)} |\Upsilon ^{t})^{\prime }= E(\omega _t^{(1)} \omega _t^{{(1)}{\prime }}|\Upsilon ^{t})-\omega _{t,t}^{(1)} \omega _{t,t}^{(1){\prime }}.)\)

  3. (iii)

    \(E(P(\varepsilon _{t+1} )\varepsilon _{t+1}^{\prime }|\Upsilon ^{t})=0, \quad E(P(\varepsilon _{t+1} )(\omega _t^{(1)} \!\otimes \! \varepsilon _{t+1} )^{\prime }|\Upsilon ^{t})=0\) (due to Isserlis’ theorem). Thus, the conditional covariance between the \(1^{\mathrm{st}}\) and \(3^{\mathrm{rd}}\) rhs terms in (A.1) and between the \(2\mathrm{nd}\) and \(3{\mathrm{rd}}\) rhs terms is zero.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kollmann, R. Tractable Latent State Filtering for Non-Linear DSGE Models Using a Second-Order Approximation and Pruning. Comput Econ 45, 239–260 (2015). https://doi.org/10.1007/s10614-013-9418-3

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10614-013-9418-3

Keywords

JEL Classification

Navigation