Skip to main content

Advertisement

Log in

DSGE-SVt: An Econometric Toolkit for High-Dimensional DSGE Models with SV and t Errors

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

Presently there is growing interest in dynamic stochastic general equilibrium (DSGE) models with more parameters, endogenous variables, exogenous shocks, and observable variables than the Smets and Wouters (Am Econ Rev 97(3):586–606, 2007) model, and the incorporation of non-Gaussian distribution and time-varying volatility. A primary goal of this paper is to introduce a user-friendly MATLAB toolkit designed to reliably estimate such high-dimensional models. It simulates the posterior distribution by the tailored random block Metropolis-Hastings (TaRB-MH) algorithm of Chib and Ramamurthy (J Econom 155(1):19–38, 2010), calculates the marginal likelihood by the method of Chib (J Am Stat Assoc 90:1313–1312, 1995) and Chib and Jeliazkov (J Am Stat Assoc 96(453):270–281, 2001), and includes various post-estimation tools that are important for policy analysis, for example, functions for generating point and density forecasts. We also introduce two novel features, i.e., tailoring-at-random-frequency and parallel computing, to boost the overall computational efficiency. Another goal is to provide pointers on the prior, estimation, and comparison of these DSGE models. To demonstrate the performance of our toolkit, we apply it to estimate an extended version of the new Keynesian model of Leeper et al (Am Econom Rev 107(8):2409–2454, 2017) that has 51 parameters, 21 endogenous variables, 8 exogenous shocks, 8 observable variables, and 1494 non-Gaussian and nonlinear latent variables.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Code Availability

The toolkit is publicly available at https://github.com/econdojo/dsge-svt.

Notes

  1. See also, e.g., Dave and Malik (2017), Chiu et al. (2017), Franta (2017), and Liu (2019) for macroeconomic implications of fat-tailed shocks and stochastic volatility.

  2. The toolkit is publicly available at https://github.com/econdojo/dsge-svt. The results reported in this paper can be replicated by running the program demo.m.

  3. It is straightforward to introduce, as in Cúrdia et al. (2014), an independent Student-t distribution with different degrees of freedom for each shock innovation. For exhibition ease, we do not consider this generalization.

  4. Because some parameters are held fixed under each regime, effectively, \(\theta \) has 49 elements and \(\theta ^S\) has 25 elements.

  5. In the Leeper et al. (2017) setting with Gaussian shocks and constant volatility, this step suggests that the original prior for the standard deviation parameters should be adjusted. Alternatively, one could also adjust other components of the prior for \(\theta ^S\).

  6. The same optimization procedure is applied to obtain a starting value \(\theta ^{S,(0)}\) for the chain. This procedure is repeated multiple times, each of which is initialized at a high density point out of a large number of prior parameter draws. The optimization results will be stored in the MATLAB data file chaininit.mat, which is saved to the subfolder user/ltw17.

  7. It is worth noting that the total runtime for generating 11,000 draws is about 30 hours for \(\omega =0.5\) and is about 43 hours for \(\omega =1.0\). These numbers were measured based on a computer with Intel (R) i5-6500 CPU with 16 GB RAM. With an average inefficiency factor of 14.46 for \(\omega =0.5\) and 15.66 for \(\omega =1.0\), these numbers translate into 25.36 and 16.34 i.i.d.-equivalent draws per hour, respectively. This comparison exemplifies that the tailoring-at-random-frequency feature can effectively improve the computational efficiency of the TaRB-MH algorithm.

    Fig. 4
    figure 4

    Inefficiency factor of each parameter. Notes: The horizontal axis indicates parameter indices. The vertical line separates the structural (indexed by 1–25) and volatility (indexed by 26–49) parameters

  8. The DGPs for the structural parameters correspond to their full sample (1955:Q1–2014:Q2) regime-M estimates reported in Leeper et al. (2017).

  9. For instance, the modified harmonic mean (MHM) estimator of Gelfand and Dey (1994), used, for example, in Justiniano and Primiceri (2008) and Cúrdia et al. (2014) in medium-scale DSGE models with Student-t shocks and stochastic volatility, always favors a model specification with stronger latent features, e.g., shocks with fatter tails or volatilities with more persistence. This extreme result emerges even when the true model exhibits weak evidence of these features, such as those considered in Sect. 5.3.

  10. In contrast, Justiniano and Primiceri (2008, p. 636) and Herbst and Schorfheide (2016, p. 97) estimate the posterior ordinate in a single block, with the random-walk M-H, both detrimental to getting reliable and efficient marginal likelihood estimates, as already documented in Chib and Jeliazkov (2001).

  11. All computations performed in this section are executed on the High Performance Computing Cluster maintained by Saint Louis University (https://slu.zendesk.com/hc).

  12. This density function, when it is evaluated at the realized value of \(y_{T+1:T+h}|y_{1:T}\), is called a predictive likelihood. It is oftentimes used for comparing different models [see, e.g., Chib and Greenberg (1995a)].

  13. Define the parameter \(0<\psi <1\) such that \(\frac{\Psi ''(1)}{\Psi '(1)}\equiv \frac{\psi }{1-\psi }\).

  14. \(S(\cdot )\) satisfies \(S'(e^{\gamma })=0\) and \(S''(e^{\gamma })\equiv s>0\).

  15. See the Online Appendix of Leeper et al. (2017) for details on data construction.

References

  • Born, B., & Pfeifer, J. (2014). Policy risk and the business cycle. Journal of Monetary Economics, 68, 68–85.

    Article  Google Scholar 

  • Champagne, J., & Kurmann, A. (2013). The great increase in relative wage volatility in the United States. Journal of Monetary Economics, 60(2), 166–183.

    Article  Google Scholar 

  • Chan, J. C., & Grant, A. L. (2015). Pitfalls of estimating the marginal likelihood using the modified harmonic mean. Economics Letters, 131, 29–33.

    Article  Google Scholar 

  • Chen, R., & Liu, J. S. (2000). Mixture Kalman filters. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 62(3), 493–508.

    Article  Google Scholar 

  • Chib, S. (1995). Marginal likelihood from the Gibbs output. Journal of the American Statistical Association, 90, 1313–1321.

    Article  Google Scholar 

  • Chib, S., & Ergashev, B. (2009). Analysis of multifactor affine yield curve models. Journal of the American Statistical Association, 104(488), 1324–1337.

    Article  Google Scholar 

  • Chib, S., & Greenberg, E. (1995a). Hierarchical analysis of SUR models with extensions to correlated serial errors and time-varying parameter models. Journal of Econometrics, 68(2), 339–360.

    Article  Google Scholar 

  • Chib, S., & Greenberg, E. (1995b). Understanding the metropolis-hastings algorithm. The American Statistician, 49(4), 327–335.

    Google Scholar 

  • Chib, S., & Jeliazkov, I. (2001). Marginal likelihood from the metropolis-hastings output. Journal of the American Statistical Association, 96(453), 270–281.

    Article  Google Scholar 

  • Chib, S., Nardari, F., & Shephard, N. (2002). Markov chain Monte Carlo methods for stochastic volatility models. Journal of Econometrics, 108(2), 281–316.

    Article  Google Scholar 

  • Chib, S., & Ramamurthy, S. (2010). Tailored randomized block MCMC methods with application to DSGE models. Journal of Econometrics, 155(1), 19–38.

    Article  Google Scholar 

  • Chib, S., & Ramamurthy, S. (2014). DSGE models with student-t errors. Econometric Reviews, 33(1–4), 152–171.

    Article  Google Scholar 

  • Chib, S., & Zeng, X. (2020). Which Factors are risk factors in asset pricing? A model scan framework. Journal of Business & Economic Statistics, 38(4), 771–783.

    Article  Google Scholar 

  • Chiu, C.-W.J., Mumtaz, H., & Pinter, G. (2017). Forecasting with VAR models: Fat tails and stochastic volatility. International Journal of Forecasting, 33(4), 1124–1143.

    Article  Google Scholar 

  • Cúrdia, V., Del Negro, M., & Greenwald, D. L. (2014). Rare shocks, great recessions. Journal of Applied Econometrics, 29(7), 1031–1052.

    Article  Google Scholar 

  • Dave, C., & Malik, S. (2017). A tale of fat tails. European Economic Review, 100, 293–317.

    Article  Google Scholar 

  • Diebold, F. X., Schorfheide, F., & Shin, M. (2017). Real-time forecast evaluation of DSGE models with stochastic volatility. Journal of Econometrics, 201(2), 322–332.

    Article  Google Scholar 

  • Durbin, J., & Koopman, S. J. (2002). A simple and efficient simulation smoother for state space time series analysis. Biometrika, 89(3), 603–615.

    Article  Google Scholar 

  • Franta, M. (2017). Rare shocks vs. non-linearities: What drives extreme events in the economy? Some empirical evidence. Journal of Economic Dynamics & Control, 75, 136–157.

    Article  Google Scholar 

  • Gelfand, A. E., & Dey, D. K. (1994). Bayesian model choice: Asymptotics and exact calculations. Journal of the Royal Statistical Society Series B (Methodological), 56(3), 501–514.

    Article  Google Scholar 

  • Geweke, J. F. (2005). Contemporary Bayesian Econometrics and Statistics. Wiley.

    Book  Google Scholar 

  • Herbst, E. P., & Schorfheide, F. (2016). Bayesian Estimation of DSGE Models. Princeton University Press.

    Book  Google Scholar 

  • Justiniano, A., & Primiceri, G. E. (2008). The time-varying volatility of macroeconomic fluctuations. American Economic Review, 98(3), 604–41.

    Article  Google Scholar 

  • Kapetanios, G., Masolo, R. M., Petrova, K., & Waldron, M. (2019). A time-varying parameter structural model of the UK economy. Journal of Economic Dynamics & Control, 106, 103705.

    Article  Google Scholar 

  • Kim, S., Shephard, N., & Chib, S. (1998). Stochastic volatility: Likelihood inference and comparison with ARCH models. The Review of Economic Studies, 65(3), 361–393.

    Article  Google Scholar 

  • Kim, Y. M., & Kang, K. H. (2019). Likelihood inference for dynamic linear models with Markov switching parameters: On the efficiency of the Kim filter. Econometric Reviews, 38(10), 1109–1130.

    Article  Google Scholar 

  • Kulish, M., Morley, J., & Robinson, T. (2017). Estimating DSGE models with zero interest rate policy. Journal of Monetary Economics, 88, 35–49.

    Article  Google Scholar 

  • Lazarus, E., Lewis, D. J., Stock, J. H., & Watson, M. W. (2018). HAR inference: Recommendations for practice. Journal of Business & Economic Statistics, 36(4), 541–559.

    Article  Google Scholar 

  • Leeper, E. M., Traum, N., & Walker, T. B. (2017). Clearing up the fiscal multiplier morass. American Economic Review, 107(8), 2409–54.

    Article  Google Scholar 

  • Liu, X. (2019). On tail fatness of macroeconomic dynamics. Journal of Macroeconomics, 62, 103154.

    Article  Google Scholar 

  • Mele, A. (2020). Does school desegregation promote diverse interactions? An equilibrium model of segregation within schools. American Economic Journal-Economic Policy, 12(2), 228–257.

    Article  Google Scholar 

  • Rathke, A., Straumann, T., & Woitek, U. (2017). Overvalued: Swedish monteary policy in the 1930s. International Economic Review, 58(4), 1355–1369.

    Article  Google Scholar 

  • Sims, C. A. (2002). Solving linear rational expectations models. Computational Economics, 20(1), 1–20.

    Article  Google Scholar 

  • Sims, C. A., Waggoner, D. F., & Zha, T. (2008). Methods for inference in large multiple-equation Markov-switching models. Journal of Econometrics 146(2), 255–274. Nelson: Honoring the research contributions of Charles R.

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

    Article  Google Scholar 

Download references

Funding

F. Tan acknowledges the financial support from the Chaifetz School of Business summer research grant.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fei Tan.

Ethics declarations

Conflicts of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The views expressed in this paper are solely those of the authors and do not necessarily reflect the views of the Federal Reserve Bank of Philadelphia or the Federal Reserve System.

Appendices

Appendix A: Leeper-Traum-Walker Model

1.1 Linearized System

Unless otherwise noted, we let \({\hat{x}}_t\equiv \ln x_t-\ln x\) denote the log-deviation of a generic variable \(x_t\) from its steady state x. We also divide a non-stationary variable \(X_t\) by the level of technology \(A_t\) and express the detrended variable as \(x_t=X_t/A_t\).

1.1.1 Firms

The production sector consists of firms that produce intermediate and final goods. A perfectly competitive final goods producer uses intermediate goods supplied by a continuum of intermediate goods producers indexed by i on the interval [0, 1] to produce the final goods. The production technology \(Y_t\le \left( {\int ^1_0}Y_t(i)^{1/(1+\eta ^p_t)}di\right) ^{1+\eta ^p_t}\) is constant-return-to-scale, where \(\eta ^p_t\) is an exogenous price markup shock, \(Y_t\) is the aggregate demand of final goods, and \(Y_t(i)\) is the intermediate goods produced by firm i.

Each intermediate goods producer follows a production technology \(Y_t(i)=K_t(i)^{\alpha }\left( A_{t}L^d_t(i)\right) ^{1-\alpha }-A_t \Omega \), where \(K_t(i)\) and \(L^d_t(i)\) are the capital and the amount of ‘packed’ labor input rented by firm i at time t, and \(0<\alpha <1\) is the income share of capital. \(A_t\) is the labor-augmenting neutral technology shock and its growth rate \(u^a_t\equiv \text {ln}(A_t/A_{t-1})\) equals \(\gamma >0\) when \(A_t\) evolves along the balanced growth path. The parameter \(\Omega >0\) represents the fixed cost of production.

Intermediate goods producers maximize their profits in two stages. First, they take the input prices, i.e., nominal wage \(W_t\) and nominal rental rate of capital \(R^k_t\), as given and rent \(L^d_t(i)\) and \(K_t(i)\) in perfectly competitive factor markets. Second, they choose the prices that maximize their discounted real profits. Here we introduce the Calvo-pricing mechanism for nominal price rigidities. Specifically, a fraction \(0<\omega _p<1\) of firms cannot change their prices each period. All other firms can only partially index their prices by the rule \(P_t(i)=P_{t-1}(i)\left( \pi _{t-1}^{\chi _p}\pi ^{1-\chi _p}\right) \), where \(P_{t-1}(i)\) is indexed by the geometrically weighted average of past inflation \(\pi _{t-1}\) and steady state inflation \(\pi \). The weight \(0<\chi _p<1\) controls the degree of partial indexation.

The production sector can be summarized by four log-linearized equilibrium equations in terms of six parameters \((\alpha ,\Omega ,\beta ,\omega _p,\chi _p,\eta ^p)\), seven endogenous variables \(({\hat{y}}_t,{\hat{k}}_t,{\hat{L}}_t,{\hat{r}}_t^k,{\hat{w}}_t,{\widehat{mc}}_t,{\hat{\pi }}_t)\), and one exogenous shock \({\hat{u}}_t^p\):

$$\begin{aligned} \text {Production function:}\,\,&{\hat{y}}_t = \frac{y+\Omega }{y}\left[ \alpha {\hat{k}}_t+(1-\alpha ){\hat{L}}_t\right] \end{aligned}$$
(A.1)
$$\begin{aligned} \text {Capital-labor ratio:}\,\,&{\hat{r}}^k_t - {\hat{w}}_t = {\hat{L}}_t - {\hat{k}}_t \end{aligned}$$
(A.2)
$$\begin{aligned} \text {Marginal cost:}\,\,&{\widehat{mc}}_t = \alpha {\hat{r}}^k_t + (1-\alpha ){\hat{w}}_t \end{aligned}$$
(A.3)
$$\begin{aligned} \text {Phillips equation:}\,\,&{\hat{\pi }}_t = \frac{\beta }{1+\beta \chi _p}{\mathbb {E}}_t{\hat{\pi }}_{t+1} + \frac{\chi _p}{1+\beta \chi _p}{\hat{\pi }}_{t-1} + \kappa _p{\widehat{mc}}_t + {\hat{u}}^p_t \end{aligned}$$
(A.4)

where \(\kappa _p\equiv [(1-\beta \omega _p)(1-\omega _p)]/[\omega _p(1+\beta \chi _p)]\), \({\hat{\eta }}^p_t\equiv \ln (1+\eta ^p_t)-\ln (1+\eta ^p)\), \({\hat{\eta }}^p_t\) is normalized to \({\hat{u}}^p_t\equiv \kappa _p{\hat{\eta }}^p_t\), and \({\mathbb {E}}_t\) represents mathematical expectation given information available at time t.

1.1.2 Households

The economy is populated by a continuum of households indexed by j on the interval [0, 1]. Each optimizing household j derives utility from composite consumption \(C_t^*(j)\), relative to a habit stock defined in terms of lagged aggregate composite consumption \(hC_{t-1}^*\) where \(0<h<1\). The composite consumption consists of private \(C_t(j)\) and public \(G_t\) consumption goods, i.e., \(C_t^{*}(j){\equiv }C_t(j)+\alpha _{G}G_t\), where \(\alpha _G\) governs the degree of substitutability of the consumption goods. Each household j also supplies a continuum of differentiated labor services \(L_t(j,l)\) where \(l\in [0,1]\). Households maximize their expected lifetime utility \({\mathbb {E}}_0 \overset{\infty }{\underset{t=0}{\sum }} \beta ^t u^b_t \left[ \text {ln}(C_t^*(j)-hC_{t-1}^*)-L_t(j)^{1+\xi }/(1+\xi )\right] \), where \(0<\beta <1\) is the discount rate, \(\xi >0\) is the inverse of Frisch labor supply elasticity, and \(u^b_t\) is an exogenous preference shock.

Households have access to one-period nominal private bonds \(B_{s,t}\) that pay one unit of currency at time \(t+1\), sell at price \(R_t^{-1}\) at time t, and are in zero net supply. They also have access to a portfolio of long-term nominal government bonds \(B_t\), which sell at the price \(P^B_t\) at time t. Maturity of these zero-coupon bonds decays at the constant rte \(0<\rho <1\) to yield the average duration \((1-\rho \beta )^{-1}\). Households receive bond earnings, labor and capital rental income, lump-sum transfers from the government \(Z_t\), and profits from firms \(\Pi _t\). They spend income on consumption, investment \(I_t\), and bonds. The nominal flow budget constraint for household j is given by

$$\begin{aligned}&(1+\tau ^C)P_tC_t(j)+P_{t}I_t(j)+P^B_{t}B_t(j)+R_t^{-1}B_{s,t}(j)\\&\quad =(1+{\rho }P^B_t)B_{t-1}(j)+B_{s,t-1}(j)\\&\quad +(1-\tau ^L)\int ^1_0 W_t(l)L_t(j,l)dl+(1-\tau ^K)R_t^{k}v_t(j){\bar{K}}_{t-1}(j)\\&\quad -\Psi (v_t){\bar{K}}_{t-1}(j)+P_{t}Z_t(j)+\Pi _t(j) \end{aligned}$$

where \(W_t(l)\) is the nominal wage charged by the household for type l labor service. Consumption and labor income are, in nominal terms, subject to a sales tax \(\tau ^C>0\) and a labor income tax \(\tau ^L>0\), respectively.

Effective capital K(j), which is subject to a rental income tax \(\tau ^K>0\), is related to physical capital \({\bar{K}}(j)\) via \(K_t(j)=v_t(j){\bar{K}}_{t-1}(j)\), where \(v_t(j)\) is the utilization rate of capital chosen by households and incurs a nominal cost of \(\Psi (v_t)\) per unit of physical capital.Footnote 13 Physical capital is accumulated by households according to \({\bar{K}}_{t}(j)=(1-\delta ){\bar{K}}_{t-1}(j)+u^i_t\left( 1-S\left( \frac{I_t(j)}{I_{t-1}(j)}\right) \right) I_t(j)\), where \(0<\delta <1\) is the depreciation rate, \(S(\cdot )I_t\) is an investment adjustment cost and \(u_t^i\) is an exogenous investment-specific efficiency shock.Footnote 14

There are perfectly competitive labor packers that hire a continuum of differentiated labor inputs \(L_t(l)\), pack them to produce an aggregate labor service and then sell it to intermediate goods producers. The labor packer uses the Dixit-Stiglitz aggregator for labor aggregation \(L^d_{t}=\left( {\int ^1_0}L_t(l)^{1/(1+\eta ^w_t)}dl\right) ^{1+\eta ^w_t}\), where \(L^d_{t}\) is the aggregate labor service demanded by intermediate goods producers, \(L_t(l)\) is the lth type labor service supplied by all the households and demanded by the labor packer, and \(\eta ^w_t\) is an exogenous wage markup shock.

For the optimal wage setting problem, we adopt the Calvo-pricing mechanism for nominal wage rigidities. Specifically, of all the types of labor services within each household, a fraction \(0<\omega _w<1\) of wages cannot be changed each period. The wages for all other types of labor services follow a partial indexation rule \(W_t(l)=W_{t-1}(l)\left( \pi _{t-1}e^{u^a_{t-1}}\right) ^{\chi _w}\left( \pi e^{\gamma }\right) ^{1-\chi _w}\), where \(W_{t-1}(l)\) is indexed by the geometrically weighted average of the growth rates of nominal wage in the past period and in the steady state, respectively. The weight \(0<\chi _w<1\) controls the degree of partial indexation.

The household sector can be summarized by ten log-linearized equilibrium equations in terms of seventeen parameters \((h,\gamma ,\alpha _G,\rho ,\tau ^C,\tau ^K,\tau ^L,\psi ,\beta ,\gamma ,s,\delta ,\xi ,\omega _w,\chi _w,\rho _a,\eta ^w)\), fifteen endogenous variables \(({\hat{\lambda }}_t,{\hat{c}}_t^*,{\hat{c}}_t,{\hat{g}}_t,{\hat{R}}_t,{\hat{\pi }}_t,{\hat{P}}_t^B,{\hat{r}}_t^k,{\hat{v}}_t,{\hat{q}}_t,{\hat{i}}_t,{\hat{k}}_t,\hat{{\bar{k}}}_t,{\hat{w}}_t,{\hat{L}}_t)\), and four exogenous shocks \(({\hat{u}}_t^a,{\hat{u}}_t^b,{\hat{u}}_t^i,{\hat{u}}_t^w)\):

$$\begin{aligned} \text {Optimal consumption:}\,\,&{\hat{\lambda }}_t = {\hat{u}}^b_t - \frac{h}{e^\gamma -h}{\hat{u}}^a_t - \frac{e^\gamma }{e^\gamma -h}{\hat{c}}^*_t \nonumber \\&\quad + \frac{h}{e^\gamma -h}{\hat{c}}^*_{t-1} - \frac{\tau ^C}{1+\tau ^C}{\hat{\tau }}^C_t \end{aligned}$$
(A.5)
$$\begin{aligned} \text {Composite consumption:}\,\,&{\hat{c}}^*_t = \frac{c}{c+\alpha _G g}{\hat{c}}_t + \frac{\alpha _G g}{c+\alpha _G g}{\hat{g}}_t \end{aligned}$$
(A.6)
$$\begin{aligned} \text {Consumption Euler:}\,\,&{\hat{\lambda }}_t = {\hat{R}}_t + {\mathbb {E}}_t{\hat{\lambda }}_{t+1} - {\mathbb {E}}_t{\hat{\pi }}_{t+1} - {\mathbb {E}}_t{\hat{u}}^a_{t+1} \end{aligned}$$
(A.7)
$$\begin{aligned} \text {Bond pricing:}\,\,&{\hat{R}}_t + {\hat{P}}^B_t = \frac{\rho P^B}{1+\rho P^B} {\mathbb {E}}_t{\hat{P}}^B_{t+1} = \frac{\rho }{R}{\mathbb {E}}_t{\hat{P}}^B_{t+1} \end{aligned}$$
(A.8)
$$\begin{aligned} \text {Optimal capital utilization:}\,\,&{\hat{r}}^k_t - \frac{\tau ^K}{1-\tau ^K}{\hat{\tau }}^K_t = \frac{\psi }{1-\psi }{\hat{v}}_t \end{aligned}$$
(A.9)
$$\begin{aligned} \text {Optimal physical capital:}\,\,&{\hat{q}}_t = {\mathbb {E}}_t {\hat{\lambda }}_{t+1} - {\hat{\lambda }}_{t} - {\mathbb {E}}_t {\hat{u}}^a_{t+1} + \beta e^{-\gamma }(1-\tau ^K)r^k {\mathbb {E}}_t {\hat{r}}^k_{t+1}\nonumber \\&\qquad - \beta e^{-\gamma }\tau ^K r^k {\mathbb {E}}_t {\hat{\tau }}^K_{t+1} + \beta e^{-\gamma }(1-\delta ){\mathbb {E}}_t {\hat{q}}_{t+1} \end{aligned}$$
(A.10)
$$\begin{aligned} \text {Optimal investment:}\,\,&{\hat{i}}_t = - \frac{1}{1+\beta }{\hat{u}}^a_{t} + \frac{1}{(1+\beta )se^{2\gamma }}{\hat{q}}_t + {\hat{u}}^i_{t} + \frac{\beta }{1+\beta }{\mathbb {E}}_t{\hat{i}}_{t+1}\nonumber \\&\qquad + \frac{\beta }{1+\beta }{\mathbb {E}}_t{\hat{u}}^a_{t+1} + \frac{1}{1+\beta }{\hat{i}}_{t-1} \end{aligned}$$
(A.11)
$$\begin{aligned} \text {Effective capital:}\,\,&{\hat{k}}_t = {\hat{v}}_t + \hat{{\bar{k}}}_{t-1} - {\hat{u}}^a_{t} \end{aligned}$$
(A.12)
$$\begin{aligned} \text {Capital law of motion:}\,\,&\hat{{\bar{k}}}_t = [1-(1-\delta )e^{-\gamma }]((1+\beta )se^{2\gamma }{\hat{u}}^i_{t}+{\hat{i}}_t)\nonumber \\&\qquad +(1-\delta )e^{-\gamma }(\hat{{\bar{k}}}_{t-1}-{\hat{u}}^a_{t}) \end{aligned}$$
(A.13)
$$\begin{aligned} \text {Wage equation:}\,\,&{\hat{w}}_t= - \kappa _w \left[ {\hat{w}}_t-\xi {\hat{L}}_t-{\hat{u}}^b_t+{\hat{\lambda }}_t-\frac{\tau ^L}{1-\tau ^L}{\hat{\tau }}^L_t\right] \nonumber \\&\qquad +\frac{1}{1+\beta }{\hat{w}}_{t-1} + \frac{\beta }{1+\beta }{\mathbb {E}}_t{\hat{w}}_{t+1} + \frac{\chi _w}{1+\beta }{\hat{\pi }}_{t-1} \nonumber \\&\qquad - \frac{1+\beta \chi _w}{1+\beta }{\hat{\pi }}_{t} + \frac{\beta }{1+\beta }{\mathbb {E}}_t{\hat{\pi }}_{t+1}\nonumber \\&\qquad + \frac{\chi _w}{1+\beta }{\hat{u}}^a_{t-1} - \frac{1+\beta \chi _w-\rho _a\beta }{1+\beta }{\hat{u}}^a_{t} + {\hat{u}}^w_{t} \end{aligned}$$
(A.14)

where \(\kappa _w\equiv [(1-\beta \omega _w)(1-\omega _w)]/[\omega _w(1+\beta )(1+(1/\eta ^w+1)\xi )]\), \({\hat{\eta }}^w_t\equiv \ln (1+\eta ^w_t)-\ln (1+\eta ^w)\), \({\hat{\eta }}^w_t\) is normalized to \({\hat{u}}^w_t\equiv \kappa _w{\hat{\eta }}^w_t\), \(\hat{{\tilde{u}}}^i_t\) is normalized to \({\hat{u}}^i_t\equiv \frac{1}{(1+\beta )s e^{2\gamma }}\hat{{\tilde{u}}}^i_t\), and \(\lambda _t\) is the Lagrange multiplier associated with the household’s budget constraint. We set the capital, labor, and consumption tax rates to their constant steady states so that \({\hat{\tau }}^K_t={\hat{\tau }}^L_t={\hat{\tau }}^C_t=0\).

1.1.3 Monetary and Fiscal Policy

The central bank implements monetary policy according to a Taylor-type interest rate rule. The government collects revenues from capital, labor, and consumption taxes, and sells nominal bond portfolios to finance its interest payments and expenditures. The fiscal choices must satisfy the government budget constraint \(P^B_tB_t+\tau ^KR^K_tK_t+\tau ^LW_tL_t+\tau ^CP_tC_t=(1+\rho P^B_t)B_{t-1}+P_tG_t+P_tZ_t\), where we have assumed the lump sum transfers are equal across households, i.e., \(\int _{0}^{1}Z_t(j)dj=Z_t\), and fiscal instruments follow the simple rules specified below.

The government sector can be summarized by seven log-linearized equilibrium equations in terms of thirteen parameters \((\tau ^C,\tau ^K,\tau ^L,\beta ,\gamma ,\rho ,\rho _r,\rho _g,\rho _z,\phi _{\pi },\phi _y,\gamma _g,\gamma _z)\), sixteen endogenous variables \(({\hat{b}}_t,{\hat{r}}_t^k,{\hat{k}}_t,{\hat{w}}_t,{\hat{L}}_t,{\hat{c}}_t,{\hat{\pi }}_t,{\hat{P}}_t^B,{\hat{g}}_t,{\hat{z}}_t,{\hat{y}}_t,{\hat{i}}_t,{\hat{v}}_t,{\hat{R}}_t,{\hat{s}}_t^b,{\hat{s}}_t)\), and four exogenous shocks \(({\hat{u}}^a_t,{\hat{u}}^m_t,{\hat{u}}^g_{t},{\hat{u}}^z_{t})\):

$$\begin{aligned} \text {Government budget constraint:}&\frac{b}{y}{\hat{b}}_t + \tau ^K r^k \frac{k}{y} \left[ {\hat{\tau }}^K_t+{\hat{r}}^k_t+{\hat{k}}_t\right] \nonumber \\&\quad + \tau ^L w \frac{L}{y} \left[ {\hat{\tau }}^L_t+{\hat{w}}_t+{\hat{L}}_t\right] \nonumber \\&\quad + \tau ^C \frac{c}{y}({\hat{\tau }}^C_t+{\hat{c}}_t)\nonumber \\&\quad =\frac{1}{\beta }\frac{b}{y} \left[ {\hat{b}}_{t-1}-{\hat{\pi }}_{t}-{\hat{P}}^B_{t-1}-{\hat{u}}^a_{t}\right] \nonumber \\&\quad + \frac{b}{y}\frac{\rho }{\pi e^\gamma }{\hat{P}}^B_{t} + \frac{g}{y}{\hat{g}}_t + \frac{z}{y}{\hat{z}}_t \end{aligned}$$
(A.15)
$$\begin{aligned} \text {Aggregate resource constraint:}&{\hat{y}}_t = \frac{c}{y}{\hat{c}}_t + \frac{i}{y}{\hat{i}}_t + \frac{g}{y}{\hat{g}}_t + \psi '(1)\frac{k}{y}{\hat{v}}_t \end{aligned}$$
(A.16)
$$\begin{aligned} \text {Monetary policy rule:}&{\hat{R}}_t = \rho _r {\hat{R}}_{t-1} + (1-\rho _r) \left( \phi _\pi {\hat{\pi }}_t+\phi _y{\hat{y}}_t\right) + {\hat{u}}^m_t \end{aligned}$$
(A.17)
$$\begin{aligned} \text {Fiscal policy rule:}&{\hat{g}}_t = \rho _g {\hat{g}}_{t-1} - (1-\rho _g)\gamma _g {\hat{s}}^b_{t-1} + {\hat{u}}^g_{t} \end{aligned}$$
(A.18)
$$\begin{aligned}&{\hat{z}}_t = \rho _z {\hat{z}}_{t-1} - (1-\rho _z)\gamma _z {\hat{s}}^b_{t-1} + {\hat{u}}^z_{t} \end{aligned}$$
(A.19)
$$\begin{aligned} \text {Real primary surplus:}&{\hat{s}}_t = \tau ^K r^k \frac{k}{s} \left( {\hat{\tau }}^K_t+{\hat{r}}^k_t+{\hat{k}}_t\right) \nonumber \\&\quad + \tau ^L w \frac{L}{s} \left( {\hat{\tau }}^L_t+{\hat{w}}_t+{\hat{L}}_t\right) \nonumber \\&\quad + \tau ^C \frac{c}{s}({\hat{\tau }}^C_t+{\hat{c}}_t) - \frac{g}{s}{\hat{g}}_t - \frac{z}{s}{\hat{z}}_t \end{aligned}$$
(A.20)
$$\begin{aligned} \text {Debt-to-output ratio:}&{\hat{s}}^b_t = {\hat{b}}_t - {\hat{y}}_t \end{aligned}$$
(A.21)

where \(s^b_{t-1}\equiv \frac{P^B_{t-1}B_{t-1}}{P_{t-1}Y_{t-1}}\) denotes the market value of the debt-to-GDP ratio, \(s=\tau ^K r^k k + \tau ^L w L + \tau ^C c - g - z\), \(0<\rho _r,\rho _g,\rho _z<1\) measure policy smoothness, \(\phi _\pi ,\phi _y>0\) and \(\gamma _g,\gamma _z\) are policy parameters, and \(({\hat{u}}^m_t,{\hat{u}}^g_{t},{\hat{u}}^z_{t})\) are exogenous policy shocks.

1.1.4 Exogenous Processes

All exogenous shocks follow autoregressive processes

$$\begin{aligned} {\hat{u}}_t^s=\rho _{es}{\hat{u}}_{t-1}^s+\epsilon _t^s,\qquad s\in \{a,b,i,p,w,m,g,z\} \end{aligned}$$
(A.22)

where \(\rho _{es}\in (0,1)\) and the innovations \(\epsilon _t^s\) are serially uncorrelated and independent of each other at all leads and lags.

1.2 Original System

Since the economy features a stochastic trend induced by the permanent technology shock \(A_t\), some variables are not stationary. To induce stationarity, we therefore detrend these variables as: \(y_t\equiv \frac{Y_t}{A_t}\), \(c_t^*\equiv \frac{C_t^*}{A_t}\), \(c_t\equiv \frac{C_t}{A_t}\), \(k_t\equiv \frac{K_t}{A_t}\), \({\bar{k}}_t\equiv \frac{{\bar{K}}_t}{A_t}\), \(i_t\equiv \frac{I_t}{A_t}\), \(g_t\equiv \frac{G_t}{A_t}\), \(z_t\equiv \frac{Z_t}{A_t}\), \(b_t\equiv \frac{P^B_{t}B_t}{P_{t}A_t}\), \(w_t\equiv \frac{W_t}{P_{t}A_t}\), \(\lambda _t\equiv \varLambda _{t}A_t\). The model’s equilibrium system in terms of the detrended variables can be summarized as follows.

Production function:

$$\begin{aligned} y_t \Delta ^p_t = k_t^\alpha (L^d_t)^{1-\alpha } - \Omega \end{aligned}$$
(A.23)

Capital-labor ratio:

$$\begin{aligned} \frac{k_t}{L^d_t} = \frac{w_t}{r^k_t} \frac{\alpha }{1-\alpha } \end{aligned}$$
(A.24)

Real marginal cost:

$$\begin{aligned} mc_t = (1-\alpha )^{\alpha -1}\alpha ^{-\alpha }(r^k_t)^\alpha w_t^{1-\alpha } \end{aligned}$$
(A.25)

Intermediate goods producer’s optimal price:

$$\begin{aligned}&{\mathbb {E}}_t \left[ \overset{\infty }{\underset{k=0}{\sum }} (\beta \omega _p)^k \lambda _{t+k} {\bar{y}}_{t+k} \left( \pi ^{*}_t \prod ^{k}_{s=1} \left( \frac{\pi _{t+s-1}}{\pi }\right) ^{\chi _p} \frac{\pi }{\pi _{t+s}}\right. \right. \nonumber \\&\quad \left. \left. - (1+\eta ^p_{t+k})mc_{t+k}\right) \right] = 0 \end{aligned}$$
(A.26)

Evolution of aggregate price index:

$$\begin{aligned} 1= (1-\omega _p)(\pi ^{*}_t)^{-\frac{1}{\eta ^p_t}} + \omega _p \left[ \left( \frac{\pi _{t-1}}{\pi }\right) ^{\chi _p} \frac{\pi }{\pi _{t}}\right] ^ {-\frac{1}{\eta ^p_t}} \end{aligned}$$
(A.27)

Optimal consumption:

$$\begin{aligned} \lambda _t (1+\tau ^C_t) = \frac{u^b_t}{c_t^*-\theta c_{t-1}^* e^{-u^a_t}} \end{aligned}$$
(A.28)

Composite consumption:

$$\begin{aligned} c_t^* = c_t + \alpha _G g_t \end{aligned}$$
(A.29)

Consumption Euler equation:

$$\begin{aligned} \lambda _t = \beta R_t {\mathbb {E}}_t \left[ \frac{\lambda _{t+1} e^{-u^a_{t+1}}}{\pi _{t+1}}\right] \end{aligned}$$
(A.30)

Bond pricing relation:

$$\begin{aligned} P^B_t = {\mathbb {E}}_t \left[ \frac{1+\rho P^B_{t+1}}{R_t}\right] \end{aligned}$$
(A.31)

Optimal capital utilization:

$$\begin{aligned} (1-\tau ^K_t)r^k_t = \psi '(v_t) \end{aligned}$$
(A.32)

Optimal physical capital:

$$\begin{aligned} q_t = \beta {\mathbb {E}}_t \left[ \frac{\lambda _{t+1}}{\lambda _t} e^{-u^a_{t+1}} \left( (1-\tau ^K_{t+1})r^k_{t+1}v_{t+1}-\psi (v_{t+1})+(1-\delta )q_{t+1}\right) \right] \end{aligned}$$
(A.33)

where \(q_t\) is the real price of capital in terms of consumption goods (i.e., Tobin’s Q).

Optimal investment:

$$\begin{aligned} 1= & {} q_t {\tilde{u}}^i_t \left( 1-S\left( \frac{i_t e^{u^a_t}}{i_{t-1}}\right) -S'\left( \frac{i_t e^{u^a_t}}{i_{t-1}}\right) \frac{i_t e^{u^a_t}}{i_{t-1}}\right) \nonumber \\&+ \beta {\mathbb {E}}_t \left[ q_{t+1} \frac{\lambda _{t+1}e^{-u^a_{t+1}}}{\lambda _t} {\tilde{u}}^i_{t+1} S'\left( \frac{i_{t+1} e^{u^a_{t+1}}}{i_{t}}\right) \left( \frac{i_{t+1} e^{u^a_{t+1}}}{i_{t}}\right) ^2\right] \end{aligned}$$
(A.34)

Effective capital:

$$\begin{aligned} k_t = v_t {\bar{k}}_{t-1} e^{-u^a_t} \end{aligned}$$
(A.35)

Law of motion for capital:

$$\begin{aligned} {\bar{k}}_t = (1-\delta )e^{-u^a_t} {\bar{k}}_{t-1} + {\tilde{u}}^i_t \left( 1-S\left( \frac{i_t e^{u^a_t}}{i_{t-1}}\right) \right) i_t \end{aligned}$$
(A.36)

Optimal wage:

$$\begin{aligned}&{\mathbb {E}}_t \left[ \overset{\infty }{\underset{k=0}{\sum }} (\beta \omega _w)^k \lambda _{t+k} {\bar{L}}_{t+k} \left( w^{*}_t \prod ^{k}_{s=1}\left( \frac{\pi _{t+s-1} e^{u^a_{t+s-1}}}{\pi {e}^\gamma }\right) ^{\chi _w} \frac{\pi {e}^\gamma }{\pi _{t+s}e^{u^a_{t+s}}}\right. \right. \nonumber \\&\left. \left. \quad - \frac{(1+\eta ^w_{t+k})u^b_{t+k}{\bar{L}}^\xi _{t+k}}{(1-\tau ^L_{t+k})\lambda _{t+k}} \right) \right] = 0 \end{aligned}$$
(A.37)

where

$$\begin{aligned} {\bar{L}}_{t+k} = \left[ \frac{w^{*}_t}{w_{t+k}} \prod ^{k}_{s=1}\left( \frac{\pi _{t+s-1}e^{u^a_{t+s-1}}}{\pi {e}^\gamma }\right) ^{\chi _w} \frac{\pi {e}^\gamma }{\pi _{t+s}e^{u^a_{t+s}}}\right] ^{-\frac{1+\eta ^w_{t+k}}{\eta ^w_{t+k}}} L^d_{t+k} \end{aligned}$$
(A.38)

Evolution of aggregate wage index:

$$\begin{aligned} w_t^{-\frac{1}{\eta ^w_t}} = (1-\omega _w)(w^{*}_t)^{-\frac{1}{\eta ^w_t}} + \omega _w \left[ \left( \frac{\pi _{t-1}e^{u^a_{t-1}}}{\pi {e}^\gamma }\right) ^{\chi _w} \left( \frac{\pi {e}^\gamma }{\pi _{t}e^{u^a_{t}}}\right) w_{t-1}\right] ^{-\frac{1}{\eta ^w_t}} \end{aligned}$$
(A.39)

Government budget constraint:

$$\begin{aligned} b_t + \tau ^K_t r^k_t k_t + \tau ^L_t w_t L_t + \tau ^C_t c_t = \frac{1+\rho P^B_t}{P^B_{t-1}}\frac{b_{t-1}}{\pi _t e^{u^a_t}} + g_t + z_t \end{aligned}$$
(A.40)

Aggregate resource constraint:

$$\begin{aligned} y_t = c_t + i_t + g_t + \psi (v_t) {\bar{k}}_{t-1}e^{-u^a_t} \end{aligned}$$
(A.41)

1.3 Steady States

To solve for the steady states, we calibrate \(\beta =0.99\), \(\alpha =0.33\), \(\delta =0.025\), the average maturity of government bond portfolio \(AD=20\), \(\eta ^w=\eta ^p=0.14\), \(g/y=0.11\), \(b/y=1.47\), \(\tau ^C=0.023\), \(\tau ^K=0.218\), and \(\tau ^L=0.186\). By assumption, \(v=1\), \(\psi (v)=0\), and \(S(e^\gamma )=S'(e^\gamma )=0\). The remaining steady states can be solved as follows.

From AD:

$$\begin{aligned} \rho =\left( 1-\frac{1}{AD}\right) \frac{1}{\beta } \end{aligned}$$
(A.42)

From (A.30):

$$\begin{aligned} R=\frac{e^\gamma \pi }{\beta } \end{aligned}$$
(A.43)

From (A.31):

$$\begin{aligned} P^B=\frac{\beta }{e^\gamma \pi -\rho \beta } \end{aligned}$$
(A.44)

From \({\tilde{u}}^i=1\) and (A.34):

$$\begin{aligned} q=1 \end{aligned}$$
(A.45)

From (A.33):

$$\begin{aligned} r^k=\frac{\frac{e^\gamma }{\beta }-(1-\delta )}{1-\tau ^K} \end{aligned}$$
(A.46)

From (A.32):

$$\begin{aligned} \psi '(1)=r^k(1-\tau ^K) \end{aligned}$$
(A.47)

From (A.26):

$$\begin{aligned} mc=\frac{1}{1+\eta ^p} \end{aligned}$$
(A.48)

From (A.25):

$$\begin{aligned} w=\left[ mc (1-\alpha )^{1-\alpha } \alpha ^\alpha (r^k)^{-\alpha }\right] ^{\frac{1}{1-\alpha }} \end{aligned}$$
(A.49)

From (A.24):

$$\begin{aligned} \frac{k}{L} = \frac{\alpha }{1-\alpha }\frac{w}{r^k} \end{aligned}$$
(A.50)

From \(\Delta ^p=1\), the final goods producer’s zero profit condition, and (A.23):

$$\begin{aligned} \frac{\Omega }{L} = \left( \frac{k}{L}\right) ^\alpha - r^k \frac{k}{L} - w \end{aligned}$$
(A.51)

From (A.51):

$$\begin{aligned} \frac{y}{L} = \left( \frac{k}{L}\right) ^\alpha - \frac{\Omega }{L} \end{aligned}$$
(A.52)

From (A.35):

$$\begin{aligned} {\bar{k}}=k e^\gamma \end{aligned}$$
(A.53)

From (A.36):

$$\begin{aligned} \frac{i}{L} = \left[ 1-(1-\delta )e^{-\gamma }\right] e^\gamma \frac{k}{L} \end{aligned}$$
(A.54)

From (A.41):

$$\begin{aligned} \frac{c}{L} = \frac{y}{L}\left( 1-\frac{g}{y}\right) -\frac{i}{L} \end{aligned}$$
(A.55)

From (A.40):

$$\begin{aligned} \frac{z}{L} = \left[ \left( 1-\frac{R}{\pi e^\gamma }\right) \frac{b}{y}-\frac{g}{y}\right] \frac{y}{L} + \tau ^C \frac{c}{L} + \tau ^L w + \tau ^K r^k \frac{k}{L} \end{aligned}$$
(A.56)

From (A.29):

$$\begin{aligned} \frac{c^*}{L} = \frac{c}{L} + \alpha _G \frac{g}{y} \frac{y}{L} \end{aligned}$$
(A.57)

From (A.37) and (A.39):

$$\begin{aligned} L = \left[ \frac{w(1-\tau ^L)}{(1+\tau ^C)(1+\eta ^w)}\frac{1}{(1-\theta e^{-\gamma })\frac{c^*}{L}}\right] ^{\frac{1}{\xi +1}} \end{aligned}$$
(A.58)

from which all level variables can be calculated from the steady state ratios given above.

1.4 Taking Model to Data

Define the private sector’s one-step-ahead endogenous forecast errors as

$$\begin{aligned} \eta _t^x\equiv {\hat{x}}_t - {\mathbb {E}}_{t-1}{\hat{x}}_t,\qquad x\in \{\lambda ,\pi ,i,q,r^k,w,P^B\}. \end{aligned}$$
(A.59)

The model consists of 36 log-linearized equilibrium equations and can be cast into the rational expectations system

$$\begin{aligned} \underbrace{\begin{bmatrix} \Gamma _0^{ee} &{} \Gamma _0^{ez} &{} \Gamma _0^{ed} \\ {\mathbf {0}} &{} I &{} {\mathbf {0}} \\ [{\mathbf {0}}, I] &{} {\mathbf {0}} &{} {\mathbf {0}} \\ \end{bmatrix}}_{\underset{(36\times 36)}{\Gamma _0(\theta ^S)}} \underbrace{\begin{bmatrix} x_t^e \\ x_t^z \\ x_t^d \end{bmatrix}}_{\underset{(36\times 1)}{x_t}}= \underbrace{\begin{bmatrix} \Gamma _1^{ee} &{} \Gamma _1^{ez} &{} {\mathbf {0}} \\ {\mathbf {0}} &{} P &{} {\mathbf {0}} \\ {\mathbf {0}} &{} {\mathbf {0}} &{} I \end{bmatrix}}_{\underset{(36\times 36)}{\Gamma _1(\theta ^S)}} \underbrace{\begin{bmatrix} x_{t-1}^e \\ x_{t-1}^z \\ x_{t-1}^d \end{bmatrix}}_{\underset{(36\times 1)}{x_{t-1}}}+ \underbrace{\begin{bmatrix} {\mathbf {0}} \\ I \\ {\mathbf {0}} \end{bmatrix}}_{\underset{(36\times 8)}{\Psi }}\underset{(8\times 1)}{\epsilon _t}+ \underbrace{\begin{bmatrix} {\mathbf {0}} \\ {\mathbf {0}} \\ I \end{bmatrix}}_{\underset{(36\times 7)}{\Pi }}\underset{(7\times 1)}{\eta _t} \end{aligned}$$
(A.60)

where I denotes the identity matrix, \(P=\text {diag}\left( \rho _{ea},\rho _{eb},\rho _{ei},\rho _{ep},\rho _{ew},\rho _{em},\rho _{eg},\rho _{ez}\right) \),

$$\begin{aligned} \underset{(21\times 1)}{x_{t}^{e}}=[{\hat{y}}_{t},{\hat{c}}_{t}^{*},{\hat{c}} _{t},{\hat{k}}_{t},\hat{{\bar{k}}}_{t},{\hat{v}}_{t},{\hat{L}}_{t},{\widehat{mc}}_{t}, {\hat{b}}_{t},{\hat{g}}_{t},{\hat{z}}_{t},{\hat{R}}_{t},{\hat{s}}_{t}^{b},{\hat{s}}_{t}, {\hat{\lambda }}_{t},{\hat{\pi }}_{t},{\hat{\imath }}_{t},{\hat{q}}_{t},{\hat{r}}_{t}^{k}, {\hat{w}}_{t},{\hat{P}}_{t}^{B}] \end{aligned}$$

are the endogenous variables,

$$\begin{aligned} \underset{(8\times 1)}{x_{t}^{z}}=[{\hat{u}}_{t}^{a},{\hat{u}}_{t}^{b},{\hat{u}} _{t}^{i},{\hat{u}}_{t}^{p},{\hat{u}}_{t}^{w},{\hat{u}}_{t}^{m},{\hat{u}}_{t}^{g}, {\hat{u}}_{t}^{z}] \end{aligned}$$

are the exogenous shocks,

$$\begin{aligned} \underset{(7\times 1)}{x_{t}^{d}}=[{\mathbb {E}}_{t}{\hat{\lambda }}_{t+1},\mathbb { E}_{t}{\hat{\pi }}_{t+1},{\mathbb {E}}_{t}{\hat{\imath }}_{t+1},{\mathbb {E}}_{t}{\hat{q}} _{t+1},{\mathbb {E}}_{t}{\hat{r}}_{t+1}^{k},{\mathbb {E}}_{t}{\hat{w}}_{t+1},{\mathbb {E}} _{t}{\hat{P}}_{t+1}^{B}] \end{aligned}$$

are the conditional expectations of the last seven elements of \(x_{t+1}^{e}\) ,

$$\begin{aligned} \underset{(8\times 1)}{\epsilon _{t}}=[\epsilon _{t}^{a},\epsilon _{t}^{b},\epsilon _{t}^{i},\epsilon _{t}^{p},\epsilon _{t}^{w},\epsilon _{t}^{m},\epsilon _{t}^{g},\epsilon _{t}^{z}]^{\prime } \end{aligned}$$

are the shock innovations, and

$$\begin{aligned} \underset{(7\times 1)}{\eta _{t}}=[\eta _{t}^{\lambda },\eta _{t}^{\pi },\eta _{t}^{i},\eta _{t}^{q},\eta _{t}^{r^{k}},\eta _{t}^{w},\eta _{t}^{P^{B}}]^{\prime } \end{aligned}$$

are the forecast errors.

Here the first row of (A.60) stacks the 21 structural equations (A.1)– (A.21), the second row stacks the 8 shock processes (A.22), and the third row stacks the 7 definitional equations (A.59). The unknown parameters \(\theta \) consist of the structural parameters

$$\begin{aligned} \underset{(27\times 1)}{\theta ^{S}}= & \, [100\gamma ,\xi ,h,\alpha _{G},\psi ,s,\omega _{p},\omega _{w},\chi _{p},\chi _{w},\phi _{\pi },\phi _{y},\gamma _{g},\\&\gamma _{z},\rho _{r},\rho _{g},\rho _{z},\rho _{ea},\rho _{eb},\rho _{ei},\rho _{ep},\rho _{ew},\rho _{em},\rho _{eg},\rho _{ez},{\bar{L}},\bar{\pi }] \end{aligned}$$

and the volatility parameters

$$\begin{aligned} \underset{(24\times 1)}{\theta ^{V}}= & {} [\mu _{a},\mu _{b},\mu _{i},\mu _{p},\mu _{w},\mu _{m},\mu _{g},\mu _{z},\phi _{a},\phi _{b},\phi _{i},\\&\phi _{p},\phi _{w},\phi _{m},\phi _{g},\phi _{z},\omega _{a}^{2},\omega _{b}^{2},\omega _{i}^{2},\omega _{p}^{2},\omega _{w}^{2},\omega _{m}^{2},\omega _{g}^{2},\omega _{z}^{2}]. \end{aligned}$$

Conditional on \(\theta ^S\) and independent of the volatility processes, the above structural system can be solved by the procedure of Sims (2002) to deliver a linear solution of the form

$$\begin{aligned} x_t=\underset{(36\times 36)}{G(\theta ^S)}x_{t-1}+\underset{(36\times 8)}{M(\theta ^S)}\epsilon _t \end{aligned}$$
(A.61)

which is then estimated over a vector \(y_t\) of 8 observable variables stacked in \(y_{1:T}=[y_1,\ldots ,y_T]'\), including log differences (denoted dl) of consumption, investment, real wage, government spending, and government debt; log (denoted l) hours worked, inflation, and nominal interest rate.Footnote 15 The observable variables are linked to the model variables \(x_t\) via the following measurement equations:

$$\begin{aligned} \underbrace{\begin{bmatrix} \text {dlCons}_t \\ \text {dlInv}_t \\ \text {dlWage}_t \\ \text {dlGovSpend}_t \\ \text {dlGovDebt}_t \\ \text {lHours}_t \\ \text {lInfl}_t \\ \text {lFedFunds}_t \end{bmatrix}}_{y_t}= \underbrace{\begin{bmatrix} 100\gamma \\ 100\gamma \\ 100\gamma \\ 100\gamma \\ 100\gamma \\ {\bar{L}} \\ {\bar{\pi }} \\ {\bar{\pi }}+100(\gamma /\beta -1) \end{bmatrix}}_{D}+ \underbrace{\begin{bmatrix} {\hat{c}}_t-{\hat{c}}_{t-1}+{\hat{u}}_t^a \\ {\hat{i}}_t-{\hat{i}}_{t-1}+{\hat{u}}_t^a \\ {\hat{w}}_t-{\hat{w}}_{t-1}+{\hat{u}}_t^a \\ {\hat{g}}_t-{\hat{g}}_{t-1}+{\hat{u}}_t^a \\ {\hat{b}}_t-{\hat{b}}_{t-1}+{\hat{u}}_t^a \\ {\hat{L}}_t \\ {\hat{\pi }}_t \\ {\hat{R}}_t \end{bmatrix}}_{Zx_t}. \end{aligned}$$
(A.62)

Let \(\lambda _{1:T}=[\lambda _1,\ldots ,\lambda _T]'\) contain all non-Gaussian latent states and \(h_{1:T}=[h_1',\ldots ,h_T']'\) contain all nonlinear latent states. In our empirical application (\(T=166\)), \(\lambda _{1:T}\) and \(h_{1:T}\) have a total of 1,494 elements. In conjunction with the shock volatility specifications (2.2) and (2.3), equations (A.61) and (A.62) form a state space representation of the DSGE model whose conditional likelihood function \(f(y_{1:T}|\theta ,\lambda _{1:T},h_{1:T})\) can be evaluated with the Kalman filter.

1.5 Tables and Figures

  • Table 5 lists the marginal prior distributions and the true values for the high-dimensional DSGE model under regime-M.

  • Table 6 summarizes the posterior parameter estimates for the model of best fit.

  • Table 7 reproduces the subsample posterior parameter estimates reported in Leeper et al. (2017), which are used to generate the simulated data sets in Sect. 5.3.

  • Figures 8 and 9 display the autocorrelation function for each model parameter.

  • Figures 10 and 11 compare the model’s estimated parameters and volatilities with their true values, respectively.

Table 5 Priors and true values for high-dimensional DSGE model parameters
Table 6 Posterior summary of DSGE model parameters
Table 7 True values for DSGE model parameters
Fig. 8
figure 8

Autocorrelation function of each structural parameter. Notes: Red horizontal lines correspond to an autocorrelation of 0.1

Fig. 9
figure 9

Autocorrelation function of each volatility parameter. Notes: See Fig. 8

Fig. 10
figure 10

Marginal prior and posterior distributions of each structural parameter. Notes: Each panel compares the prior (red dashed line) with the posterior (shaded area). Vertical lines denote the true parameter values. The kernel smoothed posterior densities are estimated using 10, 000 TaRB-MH draws

Fig. 11
figure 11

Stochastic volatility of each shock innovation. Notes: Each panel compares the model’s estimated log-variances with their true values (red solid line). Blue dashed lines denote median estimates, while shaded areas delineate \(90\%\) highest posterior density bands

Appendix B: Small-Scale DSGE Model

A log-linear approximation to the model’s equilibrium conditions around the steady state can be summarized as follows:

$$\begin{aligned} \text {Dynamic IS equation:}&{\hat{c}}_t&={\mathbb {E}}_t{\hat{c}}_{t+1}-\frac{1}{\tau }({\hat{R}}_t-{\mathbb {E}}_t{\hat{\pi }}_{t+1}-{\mathbb {E}}_t{\hat{z}}_{t+1})&\end{aligned}$$
(B.1)
$$\begin{aligned} \text {New Keynesian Phillips curve:}&{\hat{\pi }}_t&=\beta {\mathbb {E}}_t{\hat{\pi }}_{t+1}+\kappa {\hat{c}}_t&\end{aligned}$$
(B.2)
$$\begin{aligned} \text {Monetary policy:}&{\hat{R}}_t&=\rho _R{\hat{R}}_{t-1}+(1-\rho _R)[\psi _1{\hat{\pi }}_t+\psi _2({\hat{c}}_t+{\hat{g}}_t)]+\epsilon _{R,t}&\end{aligned}$$
(B.3)
$$\begin{aligned} \text {Technology shock:}&{\hat{z}}_t&=\rho _{z}{\hat{z}}_{t-1}+\epsilon _{z,t}&\end{aligned}$$
(B.4)
$$\begin{aligned} \text {Government spending shock:}&{\hat{g}}_t&=\rho _g{\hat{g}}_{t-1}+\epsilon _{g,t}&\end{aligned}$$
(B.5)

Here \(\tau >0\) is the coefficient of relative risk aversion, \(0<\beta <1\) is the discount factor, \(\kappa >0\) is the slope of the new Keynesian Phillips curve, \(\psi _1>0\) and \(\psi _2>0\) are the policy rate responsive coefficients, and \(0\le \rho _R,\rho _{z},\rho _g<1\). Moreover, \(c_t\) is the detrended consumption, \(\pi _t\) is the inflation between periods \(t-1\) and t, \(R_t\) is the nominal interest rate, \(z_t\) is an exogenous shock to the labor-augmenting technology that grows on average at the rate \(\gamma \), and \(g_t\) is an exogenous government spending shock. Finally, the shock innovations \(\epsilon _t=[\epsilon _{R,t},\epsilon _{z,t},\epsilon _{g,t}]'\) follow a multivariate Student-t distribution, i.e., \(\epsilon _t\sim t_{\nu }(0,\Sigma _t)\), where \(\Sigma _t=\text {diag}\left( e^{h_t}\right) \) and each element of \(h_t=[h_t^R,h_t^z,h_t^g]'\) follows a stationary process

$$\begin{aligned} h_{t}^s=(1-\phi _s)\mu _s+\phi _sh_{t-1}^s+\eta _{t}^s,\qquad \eta _{t}^s\sim {\mathbb {N}}(0,\omega _s^2),\qquad s\in \{R,z,g\}. \end{aligned}$$
(B.6)

The model is estimated over three observable variables, including log difference of consumption, log inflation, and log nominal interest rate. The observable variables are linked to the model variables via the following measurement equations,

$$\begin{aligned} \begin{bmatrix} \text {dlCons}_t \\ \text {lInfl}_t \\ \text {lFedFunds}_t \end{bmatrix}= \begin{bmatrix} \gamma ^{(Q)} \\ \pi ^{(Q)} \\ \pi ^{(Q)}+r^{(Q)}+\gamma ^{(Q)} \end{bmatrix}+ \begin{bmatrix} {\hat{c}}_t-{\hat{c}}_{t-1}+{\hat{z}}_t \\ {\hat{\pi }}_t \\ {\hat{R}}_t \end{bmatrix} \end{aligned}$$
(B.7)

where \((\gamma ^{(Q)},\pi ^{(Q)},r^{(Q)})\) are connected to the model’s steady states via \(\gamma =1+\gamma ^{(Q)}/100\), \(\beta =1/(1+r^{(Q)}/100)\), and \(\pi =1+\pi ^{(Q)}/100\). Table 8 lists the marginal prior distributions for the small-scale DSGE model parameters.

Table 8 Priors for small-scale DSGE model parameters

Appendix C: Practical Guide

The subfolder user/ltw17 contains the following files for the Leeper-Traum-Walker model, which are extensively annotated and can be modified, as needed, for alternative model specifications:

  • user_parvar.m—defines the parameters, priors, variables, shock innovations, forecast errors, and observable variables.

  • user_mod.m—defines the model and measurement equations.

  • user_ssp.m—defines the steady state, implied, and/or fixed parameters.

  • user_svp.m—defines the stochastic volatility parameters.

  • data.txt—prepared in matrix form where each row corresponds to the observations for a given period.

Our MATLAB toolkit is readily deployed. Once the user supplies the above model and data files, the posterior distribution, marginal likelihood, and predictive distributions (and other quantities) are computed via the single function, tarb.m, as will be illustrated below. A printed summary of the results will be recorded in the MATLAB diary file mylog.out, which is saved to the subfolder user/ltw17.

  1. 1.

    The prior sampling is implemented through the following block of code. The sampling results will be stored in the MATLAB data file tarb_prior.mat, which is saved to the subfolder user/ltw17.

    figure a
  2. 2.

    The posterior sampling is implemented in the following block of code. The estimation results will be stored in the MATLAB data file tarb_full.mat, which is saved to the subfolder user/ltw17.

    figure b
  3. 3.

    The marginal likelihood estimation is implemented in the following block of code. The estimation results will be stored in the MATLAB data file tarb_reduce.mat, which is saved to the subfolder user/ltw17.

    figure c
  4. 4.

    Sampling the predictive distribution is specified in the following block of code.

    figure d

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chib, S., Shin, M. & Tan, F. DSGE-SVt: An Econometric Toolkit for High-Dimensional DSGE Models with SV and t Errors. Comput Econ 61, 69–111 (2023). https://doi.org/10.1007/s10614-021-10200-y

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10614-021-10200-y

Keywords

JEL Classification

Navigation