On Bayesian filtering for Markov regime switching models
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Hashimzade, Nigar; Kirsanov, Oleg; Kirsanova, Tatiana; Maih, Junior Working Paper On Bayesian filtering for Markov regime switching models Working Paper, No. 8/2024 Provided in Cooperation with: Norges Bank, Oslo Suggested Citation: Hashimzade, Nigar; Kirsanov, Oleg; Kirsanova, Tatiana; Maih, Junior (2024) : On Bayesian filtering for Markov regime switching models, Working Paper, No. 8/2024, ISBN 978-82-8379-317-8, Norges Bank, Oslo, https://hdl.handle.net/11250/3172788 This Version is available at: https://hdl.handle.net/10419/310426 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by-nc-nd/4.0/
Working Paper On Bayesian Filtering for Markov Regime Switching Models Norges Bank Research A uthors: Nigar Hashimzade Oleg Kirsanov Tatiana Kirsanova Junior Maih K eywords Markov Switching models, Filtering, Smoothing 8 | 2024
Norges Bank Working Paper 1 Working papers fra Norges Bank, fra 1992/1 til 2009/2 kan bestilles på epost: [email protected] Fra 1999 og senere er publikasjonene tilgjengelige på www.norges-bank.no Working papers inneholder forskningsarbeider og utredninger som vanligvis ikke har fått sin endelige form. Hensikten er blant annet at forfatteren kan motta kommentarer fra kolleger og andre interesserte. Synspunkter og konklusjoner i arbeidene står for forfatternes regning. Working papers from Norges Bank, from 1992/1 to 2009/2 can be ordered by e-mail: [email protected] Working papers from 1999 onwards are available on www.norges-bank.no Norges Bank’s working papers present research projects and reports (not usually in their final form) and are intended inter alia to enable the author to benefit from the comments of colleagues and other interested parties. Views and conclusions expressed in working papers are the responsibility of the authors alone. ISSN 1502-8143 (online) ISBN 978-82-8379-317-8 (online)
On Bayesian Filtering for Markov Regime Switching Models Nigar HashimzadeyOleg KirsanovzTatiana KirsanovaxJunior Maih{ April 17, 2024 Abstract This paper presents a framework for empirical analysis of dynamic macroeconomic models using Bayesian …ltering, with a speci…c focus on the state-space formulation of Dynamic Stochastic General Equilibrium (DSGE) models with multiple regimes. We outline the theoretical foundations of model estimation, provide the details of two families of powerful multiple-regime …lters, IMM and GPB, and construct corresponding multiple-regime smoothers. A simulation exercise, based on a prototypical New Keynesian DSGE model, is used to demonstrate the computational robustness of the proposed …lters and smoothers and evaluate their accuracy and speed for a selection of …lters from each family. We show that the canonical IMM …lter is faster and is no less, and often more, accurate than its competitors within IMM and GPB families, the latter including the commonly used Kim and Nelson (1999) …lter. Using it with the matching smoother improves the precision in recovering unobserved variables by about 25%. Furthermore, applying it to the U.S. 1947-2023 macroeconomic time series, we successfully identify signi…cant past policy shifts including those related to the post-Covid-19 period. Our results demonstrate the practical applicability and potential of the proposed routines in macroeconomic analysis. Keywords: Markov switching models, Filtering, Smoothing JEL Reference Number: C11, C32, C54, E52 This paper should not be reported as representing the views of Norges Bank. The views expressed are those of the authors and do not necessarily re‡ect those of Norges Bank. We thank the anonymous referee for the comments provided. All errors remain ours. yDepartment of Economics and Finance, Brunel University, United Kingdom; e-mail: [email protected] zAdam Smith Business School, University of Glasgow, United Kingdom; e-mail: [email protected] xAdam Smith Business School, University of Glasgow, United Kingdom; e-mail: [email protected] {Norges Bank; e-mail [email protected] 1
1 Introduction In the evolving landscape of macroeconomic analysis, the empirical examination of dynamic models has become increasingly sophisticated and computationally demanding. This paper contributes to this area by presenting a comprehensive framework for empirical analysis of state space models with multiple regimes using Bayesian …ltering. Our work introduces enhanced …lter and smoother algorithms, crucial for accurate macroeconomic modelling and estimation. Our study is motivated by the increasing popularity of Bayesian methods in macroeconomic time series analysis in the Dynamic Stochastic General Equilibrium (DSGE) framework, usually presented in the state-space form. These methods have gained traction due to their ability to e¤ectively handle complex models with latent variables and structural changes. Bayesian perspective is invaluable for disentangling convoluted macroeconomic phenomena, such as di¤erentiating between external shocks and policy-driven economic patterns. Despite signi…cant advancements in the literature, the …eld continues to face various challenges, especially when estimating macroeconomic dynamic models with multiple regimes. One such challenge is selecting an e¢ cient and accurate …lter for likelihood computation. Another challenge is the task of reconstructing latent variables through the smoothing of estimated state variables and regime probabilities. The prevalent use of the Kim and Nelson (Kim, 1994, Kim and Nelson, 1999) …lter in macroeconomic applications (see, inter alia, Davig and Doh, 2014, Chang, Maih, and Tan, 2021, Chen, Leeper, and Leith, 2022) suggests limited exploration of alternative methods in this …eld. Despite its unquestionable power, Kim and Nelson …lter is known to have certain ‡aws. Namely, it is computationally intensive and, when extended to smoothing algorithms, computationally unstable. Perhaps, the latter is the reason for scant use of smoothing for more accurate recovery of latent variables in multiple regime models in the existing economic literature. Our paper makes both theoretical and empirical contributions in this domain. First, we introduce and extend the Interactive Multiple Model (IMM) …lter, originally developed by BarShalom (Blom and Bar-Shalom, 1988). Despite its recognition in the engineering literature, the IMM …lter remains underutilised in economic applications. In addition, we claim that the Kim and Nelson …lter belongs to the family of Generalised Pseudo-Bayesian (GPB) …lters and present it in a general form that accommodates di¤erent orders of approximation. Finally, we develop a computationally stable and easily implementable smoothing algorithm that can be conveniently adapted to a wide range of …lters in multiple regime setting. Empirically, we apply these methods 1
to a prototypical New Keynesian DSGE model and the U.S. macroeconomic time series spanning from 1947 to 2023. This exercise succeeds in identifying signi…cant policy shifts, particularly in the post-Covid-19 era, and thus demonstrates the practical relevance of our methods. We validate the superiority of the proposed …lter-smoother algorithm using rigorous simulation exercises. Our …ndings indicate that the IMM …lter outperforms the Kim and Nelson …lter in terms of computational speed while maintaining comparable accuracy. Moreover, the implementation of our proposed smoother signi…cantly enhances the precision in the recovery of latent variables, with an approximate 25% reduction in estimation errors. These empirical insights reveal the importance of smoothing in this framework, overlooked in the existing literature. One should note that while the Kim and Nelson …lter has dominated the analysis of multipleregime macroeconomic models, there have been a few exceptions. Liu, Wang, and Zha (2013) apparently applied IMM to study the role of land-price dynamics in macroeconomy. Binning and Maih (2015) used IMM to show how certain non-linear …lters can be adapted to the multiple regime setting. Bjørnland, Larsen, and Maih (2018) applied it to study the interplay between oil price shocks and macroeconomic instability. More recently, Leith, Kirsanova, Machado, and Ribeiro (2024) used IMM in a study of monetary and …scal policy changes in the United States. We are unaware of other IMM applications in macroeconomics to date. All computations presented in this paper were implemented in the RISE c toolbox (Maih, 2015).1 The paper is organised as follows. The next section presents theoretical foundations. We derive two families of …lters, one of which encompasses the Kim and Nelson …lter and the other one encompasses the canonical IMM. We derive a Markov-switching smoother adapted to the appropriate …lter family. Section 3 tests the e¢ cacy of the proposed …lter and smoother algorithms on arti…cial data. An empirical investigation is presented in Section 4. Section 5 concludes. 1RISE stands for ‘Rationality in Switching Environments’. The codes and documentation are available at https://github.com/jmaih/RISE_toolbox 2
2 Switching Filters and Smoothers 2.1 The Filtering Problem We start with a general multiple-regime state-space representation of a linear discrete-time dynamic model consisting of a measurement equation (1) and a transition equation (2), yt=cy;st+Zstt+gst"t;(1) t=c;st+Tstt1+Rstt;(2) where ytap1vector of observations, tis a m1vector of unobserved state variables, and "t and tare independent standard Gaussian random variables, t= 1; : : : ; n. All model parameters, fcy;st; c;st;Zst; Tst;gst; Rstg, depend on regime st, which is an outcome of a Markov process with h1discrete regimes. This process is described by the transition probability matrix with the generic element Q(st1; st) = Pr [stjst1], so that Ph st=1 Q(st1; st) = 1 for every regime st1 and every time t. The information available at time tis fully contained in the vector of observations Yt:= fy1; :::; ytg. The object of interest is an estimate of the unobserved state vector t;for which three estimators, tjt1; tjtand tjnare available in Bayesian framework. The …rst estimator is the forecast of tbased on information Yt1, tjt1:= E[tjYt1]: Its mean square error (MSE) is de…ned as Ptjt1:= Ehttjt1ttjt10jYt1i: In the linear single-regime setting with Gaussian shocks these objects and the associated likelihood f(ytjYt1)are computed by the well-established technique of the standard Kalman …lter (KF), which in this case is exact and optimal (Kalman, 1960). Working in a multiple-regime environment is more challenging because of the explosive dimensionality of the problem. Speci…cally, in a multiple-regime environment, exact estimation is infeasible because the number of histories that a Kalman-type …lter needs to take into account increases exponentially with every time period. At any given time t, a multiple-regime dynamic system can be in one of hpossible regimes, each corresponding to a realisation of hmutually exclusive and exhaustive random events. Denote the sequence of realised regimes from the beginning of observations up to time tby Jt: Jt=fs1; s2; :::; st1; stg 2 Ht;t 3
where HN;t is the set of all possible histories of length Nthat end at period t. There are ht possible mutually exclusive and exhaustive histories up to time t. Using the total probability theorem, the conditional pdf at time tis obtained as a Gaussian mixture with the number of terms equal to ht: f(yt+1 jYt) = X Jt f(yt+1 j Jt; Yt) Pr [JtjYt]: The probability of a given regime history is computed using Bayes formula: Pr [JtjYt] = Pr [Jtjyt; Yt1] = f(ytj Jt; Yt1) Pr [JtjYt1] f(ytjYt1) =f(ytj Jt; Yt1) Pr [st;Jt1jYt1] f(ytjYt1) =f(ytj Jt; Yt1) Pr [stj Jt1; Yt1] f(ytjYt1)Pr [Jt1jYt1] When the regime switches have Markov property, Pr [stj Jt1; Yt1]'Pr [stjst1] = Q(st1; st), which simpli…es the second term in the numerator. However, conditioning on the entire past history is still needed for the last term even if the regimes follow a Markov process. In practice, one has to resort to some approximation. In this sense, all practical multipleregime …lters are approximate and, therefore, suboptimal. One popular approach involves merging two or more histories into one. A version of this approach is well known in economic applications as the Kim and Nelson …lter. We focus on this framework and study two families of …lters with di¤erent mechanisms of approximation. In the next section, we present the Generalised Pseudo-Bayesian (GPB) …lters, and Interacting Multiple Models (IMM) …lters of arbitrary order (length of tracked histories) N: 2.2 Two Practical Families of Filters We begin with the GPB(N) family. It includes the Kim and Nelson …lter as a special case of GPB(2), as one can see from comparison of the expositions in Kim (1994) and Bar-Shalom et al. (2001). Following commonly used notations, the GPB(N) …lter uses information from the previous Nperiods, including the current one. Thus, GPB(1) ignores past history and uses current period information only, GPB(2) incorporates information from the current period and one immediately preceding period, and so on. The IMM algorithm is conceptually di¤erent from the GPB in the way it combines past histories. The version of IMM developed in Blom and Bar-Shalom (1988) corresponds to IMM(1); we refer to it as canonical IMM. One would expect that a higher Nleads to increased accuracy at the cost of a larger amount of computations. We investigate relative accuracy and speed for di¤erent Nwithin each family. 4
Another interesting question is whether the canonical IMM outperforms the KN …lter in accuracy and speed in a prototypical macroeconomic application. In this section, we present the GPB(N) and the IMM(N) algorithms in turn, using uniform notations. Where relevant, we will remind the reader that KN is the same as GPB(2). 2.2.1 Preliminaries Let Htdenote the history of regimes in Nconsecutive periods ending with period t, Ht:= fstN+1; :::; st1; stg 2 HN;t; and let Ctbe the ‘collapsed’history, de…ned as Ct:= fstN+2; :::; stg 2 HN1;t: Hence Ht=fCt1; stg=fstN+1;Ctg; and Ht1=fstN; :::; st2; st1g 2 HN;t1; Ht1[ Ht=fstN; :::; st2; st1; stg 2 HN+1;t: Let (Ht) tjt:= Pr [HtjYt] be the probability of realisation of a particular history Htconditional on information at time t. 2.2.2 Family of GPB Filters The GPB algorithm of order N, denoted GPB(N), takes into account all hNpossible histories of the …xed length N, …nishing at the current time period. It is implemented as follows. De…ne (Ct) tjt:= Pr [CtjYt] = h X stN+1=1 (Ht) tjt as the probability of the collapsed history, Ct, conditional on information at time t. Algorithm 1 GPB(N) Algorithm 5
Algorithm 3 Smoothed Probabilities Step 0. Initialise (sn) njn= Pr [snjYn]; sn= 1; :::; h: Step 1. For t=n1use (14) to compute the smoothed probability of (Ht) tjnfor history Ht. Step 2. Compute smoothed probabilities of each regime: (st) tjn= Pr [stjYn] = X Ct1 Pr [HtjYn] = X Ct1 (Ht) tjn Use (st) tjnto initialise the algorithm for t=n2: 2.3.2 Smoothed Variables The smoother is based on the properties of the joint Gaussian distribution of the forecast errors of the vector of latent state variables and the estimation errors of the vector of observations produced by the …lter. By de…nition, smoothed state vectors and MSE matrices are: (Ht) tjn=Eh(Ht) tjYn;Hti;(15) P(Ht) tjn=E(Ht) t(Ht) tjt1(Ht) t(Ht) tjt10jYn;Ht:(16) De…ne the forecast error of the state vector at time twith history Htas (Ht) tjt1:= t(Ht) tjt1(17) Then, P(Ht) tjt1=Eh(Ht) tjt1(Ht)0 tjt1jYt1;Hti:(18) De…ne the Kalman gain matrix: K(Ht) tjt1=P(Ht) tjt1Z0 sthF(Ht) tjt1i1:(19) To calculate (Ht) tjnde…ned in (15), we split the history into two components at t1and use the formula for the conditional mean of multivariate Gaussian distribution: (Ht) tjn=E[tj Ht; Yn] = Etj Ht; Yt1;fvkjk1gk=t:n =(Ht) tjt1+ n X k=t Ehtv0 kjk1jYt1;HtiF1 kjk1vkjk1 =(Ht) tjt1+ n X k=t Eh(Ht) tjt1+(Ht) tjt10 kjk1Z0 sk+ [gsk"k]0jYt1;HtiF1 kjk1vkjk1 12
where we used v(Ht) tjt1=ytZst(Ht) tjt1cy;st=ytZstt(Ht) tjt1cy;st=gst"t+Zst(Ht) tjt1: So, …nally, (Ht) tjn=(Ht) tjt1+ n X k=t Eh(Ht) tjt10 kjk1jYt1;HtiZ0 skF1 kjk1vkjk1:(20) Similarly, the formula for conditional variance of multivariate Gaussian distribution applied to (16) yields: P(Ht) tjn=P(Ht) tjt1 n X k=t Ehtv0 kjk1jYt1;HtiF1 kjk1Evkjk10 tjYt1;Ht =P(Ht) tjt1 n X k=t Eh(Ht) tjt1+(Ht) tjt10 kjk1Z0 sk+ [gsk"k]0jYt1;HtiF1 kjk1 EhZskkjk1+ [gsk"k](Ht)0 tjt1+(Ht)0 tjt1jYt1;Hti; so that P(Ht) tjn=P(Ht) tjt1 n X k=t Eh(Ht) tjt10 kjk1jYt1;HtiZ0 skF1 kjk1ZskEhkjk1(Ht)0 tjt1jYt1i(21) In expressions (20) and (21) we do not specify the future regime sequences starting from st under the summation. We introduce them in the calculations of expectations E[ j ]for every step going backward, as shown later. For now, we will need the following recursion for (Ht) tjt1:The recursion is slightly di¤erent for the two families of …lters. Lemma 1 1. For GPB(N) …lter (Ht) tjt1=Tst h X stN=1 Pr[stNjYt1;Ct1]IK(Ht1) t1jt2Zst1(Ht1) t1jt2+!t1;(22) where !t1=RsttTst h X stN=1 Pr[stNjYt1;Ct1]K(Ht1) t1jt2gst1"t1: 2. For IMM …lter (Ht) tjt1=TstX Ht1 Pr [Ht1jYt1;Ht]IK(Ht1) t1jt2Zst1(Ht1) t1jt2+!t1;(23) 13
where !t1=RsttTstX Ht1 Pr [Ht1jYt1;Ht]K(st1) t1jt2gst1"t1: Proof. For GPB(N) we have (Ht) tjt1=t(Ht) tjt1=Tstt1(Ct1) t1jt1+Rstt; and, using (Ct1) t1jt1from equation (5), (Ht) tjt1=Tst0 @t1 h X stN=1 Pr[stNjYt1;Ct1](Ht1) t1jt11 A+Rstt:(24) Similarly, for IMM(N) we have (Ht) tjt1=Tstt1^(Ht1jHt) t1jt1+Rstt and using ^(Ht1jHt) t1jt1from (11), (Ht) tjt1=Tst0 @t1X Ht1 Pr [Ht1jYt1;Ht](Ht1) t1jt11 A+Rstt:(25) Denote M( ) = Pr[ jYt1;Ct1]; =stN;for GPB(N), Pr [ jYt1;Ht]; =Ht1;for IMM(N). Then expressions (24) and (25) can be written in the same form, (Ht) tjt1=Tst0 @t1X M( )(Ht1) t1jt11 A+Rstt; and the rest of the proof is identical for both families of …lters. Use the KF update for (Ht1) t1jt1and the de…nition of Kalman gain (19) for K(Ht1) t1jt2to rewrite the last expression as: (Ht) tjt1=Tst0 @t1X M( ) (Ht1) t1jt2+P(Ht1) t1jt2Z0 st1hF(Ht1) t1jt2i1v(Ht1) t1jt2+Rstt =TstX M( )t1(Ht1) t1jt2 TstX M( )K(Ht1) t1jt2v(Ht1) t1jt2+Rstt 14
Next, use the KF output for v(Ht1) t1jt2along with the de…nition (17) for (Ht1) t1jt2and equation (1) for yt1to obtain the recursions in Lemma 1: (HN;t) tjt1=TstX M( )t1(Ht1) t1jt2 TstX M( )K(Ht1) t1jt2yt1Zst1(Ht1) t1jt2cy;st1+Rstt =TstX M( )(Ht1) t1jt2 TstX M( )K(Ht1) t1jt2Zst1(Ht1) t1jt2 +RsttTstX M( )K(Ht1) t1jt2gst1"t1 =TstX M( )IK(Ht1) t1jt2Zst1(Ht1) t1jt2+!(Ht1) t1 where we used the notation !t1=RsttTstX M( )K(Ht1) t1jt2gst1"t1: Note that in this derivation for GPB(N) the sum is taken over all possible regimes at time tNwhen stNis unknown. If the regime stNis known, this recursion is given by (stN;Ht) tjt1=TstIK(stN;Ht1) t1jt2Zst1(stN;Ht1) t1jt2+!t1:(26) Similarly, for IMM, when Ht1=~ Ht1is known, then (~ Ht1;Ht) tjt1=TstIK(~ Ht1;Ht1) t1jt2Zst1(~ Ht1;Ht1) t1jt2+!t1:(27) The remaining derivations are identical for GPB and IMM. We apply formulas (20) and (21) recursively, starting from the observation at the …nal period, n, in regime sn: (Hn) njn=(Hn) njn1+Eh(Hn) njn1(Hn)0 njn1jYn1;HniZ0 snhF(Hn) njn1i1v(Hn) njn1 =(Hn) njn1+P(Hn) njn1Z0 snhF(Hn) njn1i1v(Hn) njn1=(Hn) njn1+P(Hn) njn1r(Hn) njn1 15
where r(Hn) njn1=Z0 snhF(Hn) njn1i1v(Hn) njn1; and P(Hn) njn=P(Hn) njn1Eh(Hn) njn1(Hn)0 njn1jYn1;Hni Z0 snhF(Hn) njn1i1ZsnEhnjn1(Hn)0 njn1jYn1;Hni =P(Hn) njn1P(Hn) njn1Z0 snhF(Hn) njn1i1ZsnP(Hn) njn1 =P(Hn) njn1P(Hn) njn1N(Hn) njn1P(Hn) njn1; where N(Hn) njn1=Z0 snhF(Hn) njn1i1Zsn: Next, we move one step back to t=n1. (Hn1) n1jn=(Hn1) n1jn2+ n X k=n1 Eh(Hn1) n1jn20 kjk1jYn2;Hn1iZ0 skFkjk11vkjk1 =(Hn1) n1jn2+P(Hn1) n1jn2Z0 sn1hF(Hn1) n1jn2i1v(Hn1) n1jn2 + h X sn=1 Pr [snjYn2;Hn1] Eh(Hn1) n1jn2(snN;Hn1)0 njn1jYn2;Hn1; sniZ0 snhF(Hn) njn1i1v(Hn) njn1 =(Hn1) n1jn2+P(Hn1) n1jn2Z0 sn1hF(Hn1) n1jn2i1v(Hn1) n1jn2 + h X sn=1 Pr [snjYn2;Hn1]Eh(Hn1) n1jn2(Hn1)0 n1jn2jYn2;Hn1i IZ0 sn1K(Hn1)0 n1jn2T0 stZ0 snhF(Hn) njn1i1v(Hn) njn1 =(Hn1) n1jn2+P(Hn1) n1jn2Z0 sn1hF(Hn1) n1jn2i1v(Hn1) n1jn2(28) +P(Hn1) n1jn2 h X sn=1 Pr [snjYn2;Hn1] IZ0 sn1K(Hn1)0 n1jn2T0 stZ0 snhF(Hn) njn1i1v(Hn) njn1: 16
Similar computations yield P(Hn1) n1jn=P(Hn1) n1jn2 n X k=n1 Eh(Hn1) n1jn20 kjk1jYn2;Hn1iZ0 sk hF(Hn1) n1jn2i1ZskEhkjk1(Hn1)0 n1jn2jYn2;Hn1i =P(Hn1) n1jn2P(Hn1) n1jn2Z0 sn1hF(Hn1) n1jn2i1Zsn1P(Hn1) n1jn2(29) P(Hn1) n1jn2 h X sn=1 Pr [snjYn2;Hn1]IZ0 sn1K(Hn1)0 n1jn2 T0 stZ0 snhF(Hn) njn1i1Zsn1TstIK(Hn1) n1jn2Zsn1P(Hn1) n1jn2: In these derivations we used P(Hn1) n1jn2=Eh(Hn1) n1jn2(Hn1)0 n1jn2jYn2;Hn1; sni= Eh(Hn1) n1jn2(Hn1)0 n1jn2jYn2;Hn1ias conditioning on snbecomes irrelevant. Equations (28) and (29) can be written as: (Hn1) n1jn=(Hn1) n1jn2+P(Hn1) n1jn2r(Hn1) n1jn2; P(Hn1) n1jn=P(Hn1) n1jn2P(Hn1) n1jn2N(Hn) n1jn2P(Hn1) n1jn2; where, using approximation Pr [snjYn2;Hn1]'Q(sn1; sn);we express r(Hn1) n1jn2and N(Hn) n1jn2 recursively: r(Hn1) n1jn2=Z0 sn1hF(Hn1) n1jn2i1v(Hn1) n1jn2+ h X sn=1 Q(sn1; sn)L(Hn1)0 n;n1r(Hn) njn1; N(Hn1) n1jn2=Z0 sn1hF(Hn1) n1jn2i1Zsn1+ h X sn=1 Q(sn1; sn)L(Hn1)0 n;n1N(Hn) njn1L(Hn1) n;n1: Here L(Hn1) n;n1=TsnIK(Hn1) n1jn2Zsn1: Continuing in the same way, we can summarise the procedures in the following algorithm. Algorithm 4 State Smoothing Step 0. Initialise the smoother by setting r(Hn) njn1=Z0 snhF(Hn) njn1i1v(Hn) njn1,N(Hn) njn1= Z0 snhF(Hn) njn1i1Zsn;Hn2HN;n. Initialise (Hn) njnand P(Hn) njnby outputs of the corresponding …lter at t=n. 17
Step 1. Compute the following auxilliary quantities for each history Ht, using recursion: L(Ht) t+1;t =Tst+1 IK(Ht) tjt1Zst r(Ht) tjt1=Z0 sthF(Ht) tjt1i1v(Ht) tjt1+ h X st+1=1 Q(st; st+1)L(Ht)0 t+1;tr(Ht+1) t+1jt; N(Ht) tjt1=Z0 sthF(Ht) tjt1i1Zst+ h X st+1=1 Q(st; st+1)L(Ht)0 t+1;tN(Ht+1) t+1jtL(Ht) t;t+1 for t=n1; n 2; :::; 1: Step 2. Compute the smoothed estimates of the state vector and the MSE matrix (Ht) tjn=(Ht) tjt1+P(Ht) tjt1r(Ht) tjt1; P(Ht) tjn=P(Ht) tjt1P(Ht) tjt1N(Ht) tjt1P(Ht) tjt1; for t= 1; :::; n 1: Use the smoothed probabilities, n(Ht) tjnot=1:n1, to compute the smoothed state vectors and MSE matrices: xtjn=X Ht (Ht) tjn(Ht) tjn; Ptjn=X Ht (Ht) tjnP(Ht) tjn: 3 Validating the Filters 3.1 Model and Parameterisation To compare the performance of …lters and smoothers, we use the model developed in FernandezVillaverde, Guerron-Quintana, and Rubio-Ramirez (2015), hereafter referred to as FGR2015. It is a relatively standard medium-scale New Keynesian DSGE model, which we modify to investigate the aspects of good luck and good policy. The model consists of a household sector, …rms, and a monetary authority. Households derive utility from consumption relative to their habit stock and from leisure. They supply di¤erentiated labour to monopolistically competitive …rms and choose wages subject to Calvo wage-setting friction. Firms produce di¤erentiated output using capital, labour, and a neutral technology process. They set prices, also subject to Calvo pricing frictions. The capital stock evolves in the usual way, except for the inclusion of embodied technology in new investment goods. The 18
model is closed by imposing a Taylor-type rule for the monetary authority. We present the full speci…cation of the model in Appendix B. We base the structural parameters of the model on the estimates reported in FGR2015; see column (1) in Table C1 in Appendix B. Our treatment of policy and shock volatilities is di¤erent from FGR2015, who estimated a single-regime nonlinear policy function and a single-regime stochastic volatility process. We introduce two Markov-switching processes into the model. The …rst, SP;t, governs policy parameters in the following monetary policy rule: rt rss =rt1 rss r(SP;t) t targ (SP;t)Yd;t ydYd;t1y(SP;t)!1r(SP;t) exp ((SV;t)";t):(30) The literature typically categorizes monetary policy approaches into hawkish and dovish modes, characterized by more and less aggressive responses to in‡ation, respectively. Accordingly, we assume that the parameters are high in state SP;t = 1 (hawkish state) and low in state SP;t = 2 (dovish state). We explain below how we chose these values. The second two-state process, SV;t; governs the shock volatilities for all shocks, including the policy shock in equation (30). 3.2 Monte-Carlo Simulations Design In our simulations, we aim to di¤erentiate between periods of infrequent large shocks and periods of more frequent regular shocks. We set the probability of remaining in the low volatility state to 0.95. This parameterisation implies an average of 20 quarters between high shocks, with a standard deviation of 19 quarters.5This probability accurately re‡ects the fact that recessions in the US have occurred approximately every 8-10 years since the end of World War II. We set the probability of staying in the high volatility state to 0.8, resulting in an average duration of high shock periods of 5 quarters (with a standard deviation of 4.5 quarters). Interpreting periods of large shocks as recessions suggests that a typical recession lasts slightly for less than a year, a duration that our parameterisation appropriately captures. In formulating our policy model, we applied considerations similar to those used in the assumptions in the shock volatility experiments. The existing literature tends to report that hawkish policies have been predominant since the 1980s, spanning approximately 40 years.6However, considering the data starting from 1955 and acknowledging the evident dovish tendencies since 2008, we infer that the time split between these regimes is roughly equal. Therefore, we assume 5If probability to leave one of the two Markov states is q, then the expected length of stay in this state is 1=q with the standard deviation of p1q=q: 6See e.g. Bianchi and Melosi (2017), Chen, Kirsanova, and Leith (2017). 19
symmetric diagonal elements in the transition probability matrix. As the benchmark case, we calibrate the probability to remain in either of these states at 0.95. This implies an average of 20 quarters between policy changes, allowing for a wide range of durations between policy shifts. In addition, we consider an alternative calibration, with this probability set to 0.1. All transition matrices are presented in Table 1. Table 1: Parameterisation of shock and policy regimes Transition matrices Shocks Benchmark Case Alternative Case Ps=0:95 0:05 0:2 0:8PI p=0:95 0:05 0:05 0:95 PII p=0:9 0:1 0:1 0:9 Parameters of Taylor Rule: Hawkish Feedback Dovish Feedback Base 1:7 0:9 Altern: 1:5 0:9 As for the policy coe¢ cients that are time-varying (or depend on the state), we describe the hawkish policy mode with feedback on in‡ation Base = 1:7in the hawkish state and Base = 0:9 in the dovish state, consistent with …ndings in other studies7. We also consider an alternative parameterisation where these two feedbacks are less distinct, as shown in Table 1. In these simulations, we keep the feedback on output and the interest rate smoothing parameter the same in both hawkish and dovish states. As reported in column (1) in Table C1, the standard deviations of all shocks in the lowvolatility state, SV;t = 1;are set to be equal to the mean estimates of corresponding variables in FGR2015, and they are doubled in the high-volatility state, SV;t = 2: In order to generate arti…cial data, we solve and simulate this non-linear model using a perturbation approach with the functional iteration algorithm developed for RISE c (Maih, 2015). We chose to generate 500 samples of 1,000 observations each. We consider output growth, price in‡ation, wage in‡ation, the Federal Funds rate, and the relative price of investment goods as observable variables. The latent variables are listed in Table 2 and other relevant tables. We then use the simulation results to investigate the performance of the discussed …lters, controlling for the sample length. Within each sample, we use the initial 300 observations as a proxy for a 7See, e.g. Bianchi (2012), Chang, Kwak, and Qiu (2021), Chen, Leeper, and Leith (2022). 20
typical real-life scenario with post-WW2 quarterly data, where the in‡uence of initial conditions can be substantial. Additionally, we analyze the full sample of 1000 observations, in which we expect the impact of initial conditions to be signi…cantly diminished. 3.3 Results 3.3.1 Evaluation Criteria We need some criteria to rank the …lters for practical purpose, based on their accuracy and speed. For accuracy, or goodness-of-…t, in our exercise we cannot use measures linked to the likelihood Lt= log f(ytjYt1)returned by the …lters. This is because di¤erent …lters employ di¤erent approximations when computing the likelihood, and so comparison based on this measure is not compelling for comparison of the …lters. An alternative and, perhaps, more straightforward approach in our case is to use root mean squared errors (RMSE) for each latent variable t, given by the formula R'=1 nsim nsim X i=1 v u u t1 n n X t=1 t' ss 2 : We present the comparison of the accuracy of the …lters based on the updated variables ('=tjt) and smoothed variables ('=tjn)in Tables 2-7.8Here, nis the length of each data sample, and nsim is the number of simulations. 3.3.2 The Best Performing Filter Table 2 shows the results for four …lters: the IMM(1) and GPB(N) for N= 1;2;3, which includes the KN …lter as it is equivalent to GPB(2).9Our simulations reveal that increasing the order of the GPB(N) …lter beyond N=3 o¤ers no practical value. We do not present results for IMM(2) as it does not noticeably improve accuracy of the IMM(1). We focus on the updated variables, as these variables contribute to the likelihood used in estimation. The average RMSEs (denoted as Rtjt) for all 500 draws in the Monte Carlo experiment are presented in columns (1)-(4) of Table 2. They vary in magnitude, re‡ecting …ndings similar to those in Binning and Maih (2015), where it is observed that highly persistent latent variables, such as capital, pose greater challenges for reconstruction. The relative RMSEs in columns (5)-(8) are computed by dividing the RMSE for each variable by the lowest RMSE for that particular variable across investigated …lters. In other words, for 8In computing RMSEs, we normalise all variables, except state probabilities, by their steady-state levels, as in this model the steady state is identical for all regimes. 9Appendix A presents selected …ltering and smoothing algorithms in a form convenient for implementation. 21
Table 7: MRSEs of smoothed variables Rtj1000. vars: No Missp-d Missp-d Missp-d missp-b Policy H Shocks L Shocks H (1) (2) (3) (4) consumption 0:023 [0:032] 0:057 [0:070] 0:022 [0:036] 0:021 [0:035] capital 0:178 [0:226] 1:472 [1:683] 0:186 [0:259] 0:164 [0:239] output 0:017 [0:030] 0:020 [0:038] 0:012 [0:032] 0:011 [0:031] real wage 0:002 [0:002] 0:005 [0:005] 0:002 [0:002] 0:002 [0:02] Tobin’s Q 0:007 [0:010] 0:036 [0:037] 0:011 [0:013] 0:007 [0:010] investment 0:210 [0:302] 2:151 [2:533] 0:224 [0:349] 0:182 [0:317] labour supply 0:017 [0:029] 0:019 [0:036] 0:011 [0:031] 0:011 [0:031] preference shock 0:037 [0:043] 0:112 [0:113] 0:045 [0:051] 0:037 [0:044] labour supply shock 0:044 [0:070] 0:174 [0:199] 0:045 [0:080] 0:035 [0:073] technology shock 0:001 [0:001] 0:002 [0:002] 0:001 [0:001] 0:001 [0:001] shock state probs 0:224 [0:265] 0:247 [0:280] – – policy state probs 0:275 [0:335] –0:390 [0:408] 0:282 [0:339] Note: MRSEs of updated variables Rtjtare in square brackets. is higher than in the correctly speci…ed model. This suggests that incorrectly specifying shock volatilities signi…cantly worsens the identi…cation of policy states. In the …nal experiment, reported in column (4), we revisit the second scenario, but this time we assume that the researcher believes the volatility is always high. Although the RMSEs for updated latent variables in column (4) are higher than those in column (1), the RMSEs for smoothed variables are sometimes lower than in the correctly speci…ed model. The unexpectedly superior performance of the misspeci…ed model after smoothing can be attributed to the larger variance of shocks. By allowing for a large variance in the shocks distribution, it accommodates both large and small shocks. The smoother then revises the estimated values using the complete sample and adjusts the estimates by factoring in information about the realized shocks. 3.4 Interim Summary Overall, the …ndings in this section demonstrate the e¤ectiveness of the canonical IMM …lter, particularly when combined with the appropriate smoother, in enhancing the accuracy and e¢ ciency 28
of Bayesian estimation of state-space models. The canonical IMM outperforms the Kim and Nelson …lter in terms of computational speed while delivering comparable accuracy. The implementation of the new smoothing algorithm with the IMM …lter substantially enhances precision in estimating latent variables, reducing errors by approximately 25%. We do not …nd any substantial improvement in accuracy when using higher order …lters in our example. It is hard to predict whether the same will be true for other models. Our simulations con…rm that, despite approximations, adding more information improves the performance of the suggested …ltering-smoothing procedure. We …nd that, as long as the sample length remains above 200 observations, there is no reduction in the smoother’s e¢ cacy in reducing RMSEs for updated variables. We …nd that the …lter identi…es probabilities of more distinct policy regimes with higher accuracy. Finally, we demonstrate that we can still successfully recover latent variables even when the policy or shock volatility regimes in the model are misspeci…ed. Having established the superiority of the canonical IMM paired with the matching smoother, we focus on this …lter and smoother in the empirical application. 4 Empirical Application In this section, we further investigate the practicality of the IMM …lter with the corresponding smoother. We estimate a modi…ed version of the FGR2015 model but using the same data for 1959Q2-2013Q4 as in that paper (see Table C2 in Appendix C). In our estimation we impose relatively wide priors and use the Arti…cial Bee Colony algorithm by Karaboga and Basturk (2007) for global optimisation. Table 8: Estimation of parameters that govern the two Markov processes Transition matrices Shocks Policy Ps=0:939 05 0:060946 0:04625 0:95375 Pp=0:983 96 0:016039 0:043428 0:956 57 Parameters of Taylor Rule: Hawkish Feedback 1.6574 Dovish Feedback 0.93984 Table 8 displays the estimated mode of the distribution of transition probabilities and policy 29
parameters. We present the remaining parameters in Table C1 in Appendix C. We note that both regime-switching processes are highly persistent, and therefore their identi…cation is likely to be correct, as suggested by our simulation results. The policy process, in particular, shows that there is only a 2% probability of leaving the hawkish state. 1947Q2 1957Q1 1966Q4 1976Q3 1986Q2 1996Q1 2005Q4 2015Q3 0 0.2 0.4 0.6 0.8 1 D: High volatility state 1947Q2 1957Q1 1966Q4 1976Q3 1986Q2 1996Q1 2005Q4 2015Q3 0 0.5 1 C: Dovish state 1947Q2 1957Q1 1966Q4 1976Q3 1986Q2 1996Q1 2005Q4 2015Q3 0 0.5 1 A: Dovish state IMM GPB(1) GPB(2) GPB(3) GPB(4) GPB(5) 1947Q2 1957Q1 1966Q4 1976Q3 1986Q2 1996Q1 2005Q4 2015Q3 0 0.2 0.4 0.6 0.8 1 B: High volatility state Figure 3: Smoothed State Probabilities Panels A and B in Figure 3 report the smoothed probabilities of being in the dovish state and the high volatility state. We used the canonical IMM at the estimation stage and six di¤erent …lters at the …ltering stage. One can notice that the lines plotted for six …lters are very close to one another. The GPB …lters of order 2 to 5 produce nearly identical results and they are also extremely close to those produced by the canonical IMM. This suggests, …rst, that using a more computationally intensive higher-order GPB …lter does not necessarily improve regime identi…cation compared to the KNGPB(2) …lter, and, second, that the canonical IMM and the KN …lter are practically identical in accuracy. While GPB(1) stands out as less accurate, it still identi…es all main events similarly to the other …lters. Panel A shows the probability of being in the dovish policy state. Note that it indicates that our approach succeded in identifying all major changes in the US post-war policy stance: the 30
Great In‡ation, the Volcker Disin‡ation, the Great Moderation, the Great Financial Crisis, and the subsequent Zero Lower Bound (ZLB) period. We did not assume a special regime for ZLB monetary policy but identify this period as a dovish state. Panel B shows the probability of being in the high volatility state. Our approach correctly identi…es most of the recessions and suggests that the pre-1990s period experienced larger shocks than the more recent past. For panels C and D the dataset includes the period 1947Q2-2023Q3 (see Appendix C for details). The extended data covers a longer period, adding observations at the beginning, which should improve the identi…cation of the Great In‡ation episode, and at the end, which includes the post-Covid period with rising in‡ation in 2022-23. In these two panels we only show the results obtained using the IMM …lter (with the associated smoother) to this extended dataset. The message is similar to what is suggested by panels A and B. We identify the dovish state during the ZLB and a shift to hawkish policy a year after the ZLB lift-o¤. In addition, we see the return to the dovish policy during the Covid-19 pandemic which lasted until 2023Q1, at which time tough measures against in‡ation were taken. The post-Covid period is also characterised by relatively large shocks. 5 Conclusions Our focus in this paper has been on improving multiple-regime Bayesian …ltering techniques, alongside the development of multiple-regime smoothers. We introduced the family of IMM …lters, along with an extension of the Kim and Nelson …lter, to accommodate tracking of longer regime histories. In addition, we developed a robust smoothing algorithm that can be adapted to these extended …lters. Our simulation exercises demonstrate that the IMM …lter with our proposed smoother deliver the best combination of computational speed and accuracy in a prototypical macroeconomic application of Bayesian …ltering. Our paper provides a comprehensive toolkit for researchers working with complex macroeconomic models. We demonstrate its practical relevance in an empirical application using a NK DSGE model with long U.S. macroeconomic time series. References Bar-Shalom, Y., X.-R. Li, and T. Kirubarajan (2001). Estimation with Applications To Tracking and Navigation. New York: John Wiley and Sons. 31
Bianchi, F. (2012). Evolving monetary/…scal policy mix in the united states. American Economic Review 102(3), 167–72. Bianchi, F. and L. Melosi (2017). Escaping the Great Recession. American Economic Review 107(4), 1030–1058. Binning, A. and J. Maih (2015). Sigma point …lters for dynamic nonlinear regime switching models. Working Paper 2015/10, Norges Bank. Bjørnland, H. C., V. H. Larsen, and J. Maih (2018). Oil and macroeconomic (in)stability. American Economic Journal: Macroeconomics 10(4), 128–51. Blom, H. A. and Y. Bar-Shalom (1988). The interacting multiple model algorithm for systems with markovian switching coe¢ cients. IEEE transactions on Automatic Control 33(8), 780– 783. Chang, Y., B. Kwak, and S. Qiu (2021). U.S. Monetary and Fiscal Policy Regime Changes and Their Interactions. Mimeo, Indiana University. Chang, Y., J. Maih, and F. Tan (2021). Origins of Monetary Policy Shifts: A New Approach to Regime Switching in DSGE Models. Journal of Economic Dynamics and Control 133, 104235. Chen, X., T. Kirsanova, and C. Leith (2017). How Optimal is US Monetary Policy? Journal of Monetary Economics 92, 96–111. Chen, X., E. M. Leeper, and C. Leith (2022). Strategic Interactions in U.S. Monetary and Fiscal Policies. Quantitative Economics 13(2), 593–628. Davig, T. and T. Doh (2014). Monetary Policy Regime Shifts and In‡ation Persistence. The Review of Economics and Statistics 96(5), 862–875. De Jong, P. (1988). A cross-validation …lter for time series models. Biometrika 75 (3), 594–600. Durbin, J. and S. J. Koopman (2012). Time Series Analysis by State Space Models. Oxford: Oxford University Press. Fernandez-Villaverde, J., P. A. Guerron-Quintana, and J. Rubio-Ramirez (2015). Estimating Dynamic Equilibrium Models with Stochastic Volatility. Journal of Econometrics 185(1), 216–229. 32
Hamilton, J. D. (1989). A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica 57(2), 357–384. Kalman, R. E. (1960). A new approach to linear …ltering and prediction problems. Journal of basic Engineering 82(1), 35–45. Karaboga, D. and B. Basturk (2007). A powerful and e¢ cient algorithm for numerical function optimization: arti…cial bee colony (abc) algorithm. Journal of Global Optimization 39, 459–471. Kim, C. and C. Nelson (1999). State-space Models with Regime Switching: Classical and Gibbssampling Approaches with Applications. MIT Press. Kim, C.-J. (1994). Dynamic linear models with Markov-switching. Journal of Econometrics 60(12), 1–22. Leith, C., T. Kirsanova, C. Machado, and A. P. Ribeiro (2024). (Re)Evaluating recent macroeconomic policy in the US. Working Paper X, University of Glasgow. Liu, Z., P. Wang, and T. Zha (2013, May). Land Price Dynamics and Macroeconomic Fluctuations. Econometrica 81(3), 1147–1184. Maih, J. (2015). E¢ cient perturbation methods for solving regime-switching DSGE models. Working Paper 2015/01, Norges Bank. 33
Online Appendix to On Bayesian Filtering for Markov Regime Switching Models by Nigar Hashimzade Oleg Kirsanov Tatiana Kirsanova Junior Maih A Selected Algorithms Let My j;t =fZj;t; cy;j;t; Tj;t; c;j;t; gj;t; Rj;t;ytgbe state-space system matrices for regime jand information at time t: Let K() be a KF operator. The …ltering algorithms are summarised in Tables A1-A2. Smoothing algorithms are summarised in Table A3. Table A1: GPB Filtering Algorithms GPB(1) GPB(2) Regime probabilities j tjt:= Pr [st=jjYt]ij t1jt= Pr [st1=i; st=jjYt] j tjt=Ph i=1 ij t1jt Initialisation t1jt1; Pt1jt1; j t1jt1i t1jt1; Pi t1jt1; i t1jt1 Filtering and Updating hj tjt1; Pj tjt1; vj tjt1; j tjt; Pj tjti hij tjt1; Pij tjt1; vij tjt1; ij tjt; Pij tjti =KMy j;t;t1jt1; Pt1jt1=KMy j;t;i t1jt1; Pi t1jt1 j t= (2)t=2jFj;tj1=2e1 2vj0 tjt1F1 j:t vj tjt1ij t= (2)t=2jFi;j;tj1=2e1 2vij0 tjt1F1 i;j;tvij tjt1 Collapsing (dimension reduction) and Probabilities update j tjt=j tPh i=1 Qij t1;ti t1jt1 Ph k;m=1 m tQkm t1;tk t1jt1 ij t1jt=ij tQij t1;ti t1jt1 Ph k=1 kj tQkj t1;tk t1jt1 tjt=Ph j=1 j tjtj tjtj tjt=Ph i=1 ij t1jtij tjt Ptjt=Ph i=1 j tjtPj tjtPj tjt=Ph i=1 ij t1jtPij tjt +tjtj tjttjtj tjt0+j tjtij tjtj tjtij tjt0 j tjt=Ph i=1 ij t1jt 34
Table A2: IMM Filtering Algorithms IMM(1) IMM(2) Regime probabilities j tjt:= Pr [st=jjYt]ij t1jt= Pr [st1=i; st=jjYt] Initialisation i t1jt1; Pi t1jt1; i t1jt1ki t1jt1; Pki t1jt1; ki t1jt1 Mixing (dimension reduction) ijj t1jt1=Qij t1;ti t1jt1 Ph k=1 Qkj t1;tk t1jt1 kijij t1jt1=Qk(h1)+i;i(h1)+jki t2jt1 Ph m;l=1 Qm(h1)+l;l(h1)+jml t2jt1 0j t1jt1=Ph i=1 ijj t1jt1i t1jt10ij t1jt1=Ph k;i=1 kijij t1jt1ki t1jt1 P0j t1jt1=Ph i=1 ijj t1jt1Pi t1jt1P0ij t1jt1=Ph k;i=1 kijij t1jt1Pki t1jt1 +i t1jt10i t1jt1+ki t1jt10ki t1jt1 i t1jt10i t1jt10ki t1jt10ki t1jt10 Filtering and Updating hj tjt1; Pj tjt1; vj tjt1; j tjt; Pj tjti hij tjt1; Pij tjt1; vij tjt1; ij tjt; Pij tjti =KMy j;t;0j t1jt1; P0j t1jt1=KMy j;t;0ij t1jt1; P0ij t1jt1 j t= (2)t=2jFj;tj1=2e1 2vj0 tjt1F1 j;t vj tjt1ij t= (2)t=2jFij;tj1=2e1 2vij0 tjt1F1 ij;tvij tjt1 Probabilities update j tjt=j tPh i=1 Qij t1;ti t1jt1 Ph k;m=1 m tQkm t1;tk t1jt1 ij t1jt=ij tQij t1;ti t1jt1 Ph k=1 kj tQkj t1;tk t1jt1 Table A3: Smoothing Algorithms GPB(1) and IMM(1) GPB(2) and IMM(2) Smoothed Probabilities j tjn=Ph k=1 k t+1jn j tjtQjk t;t+1 Ph m=1 Qmk t;t+1m tjt Smoothed States Initialisaion ri njn1=Z0 i;nF1 i;n vi njn1rij njn1=Z0 j;nF1 ij;nvij njn1 Recursion Lij t+1;t =Tj;t+1 (IKi;tZi;t)Lijk t+1;t =Tk;t+1 (IKi;j;tZj;t) ri tjt1=Z0 i;tF1 i;t vi tjt1rij tjt1=Z0 t;jF1 i;j;tvij tjt1 +Ph j=1 Qij t;t+1Lij0 t+1;trj t+1jt+Ph k=1 Qjk t;t+1Lijk0 t+1;trjk t+1jt i tjn=i tjt1+Pi tjt1ri tjt1ij tjn=ij tjt1+Pij tjt1rij tjt1 Merge states j tjn=Ph i=1 ij t1jtij tjn tjn=Ph i=1 i tjni tjntjn=Ph i=1 i tjni tjn 35
B The Model This section summarises the model in Fernandez-Villaverde et al. (2015). We present the list of variables and all the model equations. We then present parameterisation of the model used in Section 3, and estimated parameters obtained in the empirical investigation discussed in Section 4. Table B1: List of Variables dtShifter to intertemp. preference CtConsumption GtGovernment consumption tMarginal utility of consumption rtgross nominal interest rate Rkt Rental rate of capital tGross in‡ation tCost of use of capital QtTobin’s Q 0 tderivative of the capital adj. cost XtInvestment utcapital utilization stInvestment adjustment cost s0 tderivative of invest. adj. cost ftCalvo wage parameter W;t Optimal real wage Wtreal wage ld;t labor demand 'tlabor supply shifter w;t Relative optimal real wage g1;t Calvo price process 1 ;t Relative Price g2;t Calvo price process 2 mctReal marginal cost Yd;t Output vp;t Price dispersion KtCapital AtNeutral technology ZtCombined technology MUtInvestment-speci…c tech. level vw;t Wage dispersion lthours worked/labor supply ";t Monetary policy shock, scale "';t labor supply shock, with scale ' "g;t Government spending shock, scale g";t Invest.-spec. technology shock, scale "d;t Preference shock, scale d"A;t Neutral technology shock, scale a 36
Table B2: Model Equations Households Capital accum-n Kt= (1 )Kt1+MUt1shXt Xt1iXt FOC consum-n dt CthCt1hEtdt+1 Ct+1hCt= t FOC bonds t=Ett+1 rt t+1 FOC capital util. Rkt =0[ut] MUt FOC capital Qt=Ett+1 t(1 )Qt+1 +Rkt+1ut+1 [ut+1] MUt+1 Capital util-n [u] = 1(u1) + 2 2(u1)2 its derivative 0[u] = 1+2 2(u1) FOC investment 1 = QtMUt1shXt Xt1is0hXt Xt1iXt Xt1 +EtQt+1MUt+1 t+1 ts0hXt+1 XtiXt+1 Xt2 Invest. adj. cost shXt Xt1i= 2Xt Xt1x2 its derivative s0hXt Xt1i=Xt Xt1x Firms Wage helper 1 ft=1 (W;t)1tW tld;t +wEtw t t+1 1W;t+1 W;t 1ft+1 Wage helper 2 ft= dt't(1+#) w;t l(1+#) d;t +wEtw t t+1 (1+#)W;t+1 W;t (1+#)ft+1 Wage setting w;t =W;t Wt Wage dynamics 1 = ww t1 t1Wt1 Wt1+ (1 w)1 w;t Wage dispersion vw;t =wWt1 Wt w t1 t vw;t1+ (1 w) w;t Price helper 1 g1;t = tmctYd;t +pEt t t+1 "g1;t+1 Price helper 2 g2;t = t;tYd;t +pEt t t+1 1";t ;t+1 g2;t+1 Price setting "g1;t = ("1) g2;t Price dynamics 1 = p t1 t1"+ (1 p)1" ;t Price dispersion vp;t =p t1 t"vp;t1+ (1 p)" ;t continued on the next page 37