Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

TVP-VAR Model

Time-varying-parameter VAR that lets transmission coefficients and shock effects drift across samples.

OverviewGraphMathReferences

Understand the mathematics

Follow the same equations and assumptions one section at a time or in a continuous reading.

Hover or focus a symbol defined in this model to find its exact matches. Select it to keep the highlight; Escape clears the selection.

State-Space Representation

The TVP-VAR is a nonlinear state-space model. The measurement equation is the VAR with time-varying coefficients:

The state vector collects three blocks: the VAR coefficients βt\beta_tβt​, the free elements αt\alpha_tαt​ of the lower-triangular contemporaneous matrix AtA_tAt​, and the log-volatilities ln⁡ht\ln h_tlnht​. Each block evolves as a random walk:

The factored covariance structure Σt=At−1Ht(At−1)′\Sigma_t = A_t^{-1} H_t (A_t^{-1})'Σt​=At−1​Ht​(At−1​)′ is Primiceri's key design choice. It separates changes in shock size (through HtH_tHt​) from changes in contemporaneous interactions among variables (through AtA_tAt​). Without this factorization, the time-varying covariance would have n(n+1)/2n(n+1)/2n(n+1)/2 free elements per period, making the state space much larger.

yt=Xt′βt+At−1Ht1/2εt,εt∼N(0,In)y_t = X_t' \beta_t + A_t^{-1} H_t^{1/2} \varepsilon_t, \quad \varepsilon_t \sim N(0, I_n)yt​=Xt′​βt​+At−1​Ht1/2​εt​,εt​∼N(0,In​)
βt\beta_tβt​

Measurement equation. Xt=In⊗(1,yt−1′,…,yt−p′)X_t = I_n \otimes (1, y'_{t-1}, \ldots, y'_{t-p})Xt​=In​⊗(1,yt−1′​,…,yt−p′​) stacks the regressors via Kronecker product.

βt=βt−1+ηt,ηt∼N(0,Q)\beta_t = \beta_{t-1} + \eta_t, \quad \eta_t \sim N(0, Q)βt​=βt−1​+ηt​,ηt​∼N(0,Q)
βt\beta_tβt​QQQ

Coefficient random walk. Q is the state innovation covariance - it controls the speed of parameter drift.

αt=αt−1+ζt,ζt∼N(0,S)\alpha_t = \alpha_{t-1} + \zeta_t, \quad \zeta_t \sim N(0, S)αt​=αt−1​+ζt​,ζt​∼N(0,S)

Contemporaneous-relationship random walk. αt\alpha_tαt​ stacks the n(n−1)/2n(n-1)/2n(n−1)/2 free elements below the diagonal of AtA_tAt​.

ln⁡hit=ln⁡hi,t−1+σiνit,νit∼N(0,1),i=1,…,n\ln h_{it} = \ln h_{i,t-1} + \sigma_i \nu_{it}, \quad \nu_{it} \sim N(0, 1), \quad i = 1, \ldots, nlnhit​=lnhi,t−1​+σi​νit​,νit​∼N(0,1),i=1,…,n

Log-volatility random walks. Independent across variables. σi\sigma_iσi​ is the volatility-of-volatility.

Σt=At−1Ht(At−1)′,Ht=diag(h1t,…,hnt)\Sigma_t = A_t^{-1} H_t (A_t^{-1})', \quad H_t = \text{diag}(h_{1t}, \ldots, h_{nt})Σt​=At−1​Ht​(At−1​)′,Ht​=diag(h1t​,…,hnt​)
Σt\Sigma_tΣt​HtH_tHt​

Factored covariance. AtA_tAt​ captures contemporaneous correlations; HtH_tHt​ captures idiosyncratic volatility.

Stack the VAR into a regression

The Kronecker product creates the correct block-diagonal regressor matrix so that βt\beta_tβt​ contains all intercepts and lag coefficients.
yt=Xt′βt+ut,Xt=In⊗(1,yt−1′,…,yt−p′)y_t = X_t' \beta_t + u_t, \quad X_t = I_n \otimes (1, y_{t-1}', \ldots, y_{t-p}')yt​=Xt′​βt​+ut​,Xt​=In​⊗(1,yt−1′​,…,yt−p′​)
βt\beta_tβt​

Factor the residual covariance

Pre-multiplying by AtA_tAt​ orthogonalizes the residuals. Each element of AtutA_t u_tAt​ut​ has its own independent variance hith_{it}hit​.
ut=At−1Ht1/2εt  ⟹  Atut=Ht1/2εtu_t = A_t^{-1} H_t^{1/2} \varepsilon_t \implies A_t u_t = H_t^{1/2} \varepsilon_tut​=At−1​Ht1/2​εt​⟹At​ut​=Ht1/2​εt​
AtA_tAt​

Count the state dimension

For n=3,p=4n=3, p=4n=3,p=4: β\betaβ has 39 elements, α\alphaα has 3, ln hhh has 3. Total state dimension: 45 per period.
dim⁡(βt)=n(np+1),dim⁡(αt)=n(n−1)2,dim⁡(ln⁡ht)=n\dim(\beta_t) = n(np + 1), \quad \dim(\alpha_t) = \frac{n(n-1)}{2}, \quad \dim(\ln h_t) = ndim(βt​)=n(np+1),dim(αt​)=2n(n−1)​,dim(lnht​)=n
βt\beta_tβt​

Block-diagonal innovation structure

The block-diagonal assumption makes the Gibbs sampler tractable - each state block can be drawn conditional on the others.
(ηtζtνt)∼N(0,(Q000S000In))\begin{pmatrix} \eta_t \\ \zeta_t \\ \nu_t \end{pmatrix} \sim N\left(0, \begin{pmatrix} Q & 0 & 0 \\ 0 & S & 0 \\ 0 & 0 & I_n \end{pmatrix}\right)​ηt​ζt​νt​​​∼N​0,​Q00​0S0​00In​​​​
QQQ

Identify the nonlinearity

The model is nonlinear in the states because σt\sigma_tσt​ appears multiplicatively with εt\varepsilon_tεt​ and exponentially in hth_tht​. This rules out a standard Kalman filter; simulation-based methods are required.
yt=Xt′βt+At−1diag(eln⁡h1t/2,…,eln⁡hnt/2)εty_t = X_t' \beta_t + A_t^{-1} \text{diag}(e^{\ln h_{1t}/2}, \ldots, e^{\ln h_{nt}/2}) \varepsilon_tyt​=Xt′​βt​+At−1​diag(elnh1t​/2,…,elnhnt​/2)εt​
βt\beta_tβt​

Conditional linearity

Conditional on the states, the measurement equation is linear Gaussian. This enables the Carter-Kohn simulation smoother for each state block in turn.
yt∣βt,At,Ht∼N(Xt′βt,  At−1Ht(At−1)′)y_t | \beta_t, A_t, H_t \sim N(X_t' \beta_t, \; A_t^{-1} H_t (A_t^{-1})')yt​∣βt​,At​,Ht​∼N(Xt′​βt​,At−1​Ht​(At−1​)′)
βt\beta_tβt​AtA_tAt​HtH_tHt​

Primiceri vs. Cogley-Sargent

Cogley and Sargent (2005) omit the time-varying AtA_tAt​ and model coefficient drift with stochastic volatility (one process per equation). This reduces the state dimension and simplifies estimation but forces all contemporaneous-correlation changes to show up as coefficient changes. Primiceri argued the separation matters: the Great Moderation involved both a decline in shock variances and a change in the Fed's reaction function.

Transition checks

Impact jump
x0=Bε0,xh=AhBε0(h=1,2,…)x_0=B\varepsilon_0,\qquad x_h=A^hB\varepsilon_0\quad(h=1,2,\ldots)x0​=Bε0​,xh​=AhBε0​(h=1,2,…)

In a linear state-space representation, B maps the innovation into the contemporaneous state. A delayed variable has a zero row in B and moves only after A propagates the shock. A jump is therefore a timing restriction, not a charting artifact.

A nonzero point at h=0 means the shock changes the plotted variable on impact. It is not the end of a smooth pre-shock segment.

Do not smooth through h=0 when the model says the shock enters contemporaneously.

Decay or hump
rh=aρhorrh=a he−λhρh,∣ρ∣<1r_h=a\rho^h\quad\text{or}\quad r_h=a\,h e^{-\lambda h}\rho^h,\qquad |\rho|<1rh​=aρhorrh​=ahe−λhρh,∣ρ∣<1

Stable eigenvalues shrink repeated applications of A. If a variable is reached through another state first, the response rises before the stable decay dominates, producing a hump-shaped path.

Post-impact movement follows the model recursion. A hump means delayed propagation, not interpolation by the chart.

Do not treat a hump as evidence of a linear ramp unless the model includes that ramp.

Variable timing

Innovation

ε0≠0,εh=0 for h>0\varepsilon_0\ne 0,\qquad \varepsilon_h=0\ \text{for}\ h>0ε0​=0,εh​=0 for h>0

The shock is dated at horizon zero. A response at h=0 is an impact effect, not the end of a hidden ramp.

State vector

xh=AhBε0x_h=A^hB\varepsilon_0xh​=AhBε0​

A state can move on impact only through the relevant row of B; otherwise it moves after A propagates the shock.

Reported response

rh=CAhBε0+Dεhr_h=CA^hB\varepsilon_0+D\varepsilon_hrh​=CAhBε0​+Dεh​

The plotted variable can jump directly through D or indirectly through the state vector.

Keep going

Read next

Continue with a related concept, model, or example.

Theory model

IS-LM Model

a well-connected theoretical model two steps from here

New angle: theoretical model →
Macro by Mark
Help
Privacy PolicyTerms of UseEthics and Compliance

© 2026 Mark Jayson Nation LLC