Aptech Store

Sign Restricted SVAR in GAUSS

Introduction

In structural vector autoregressive (SVAR) modeling, one of the core challenges is identifying the structural shocks that drive the system's dynamics.

Traditional identification approaches often rely on short-run or long-run restrictions, which require strong theoretical assumptions about contemporaneous relationships or long-term behavior.

Sign restriction identification provides greater flexibility by allowing economists to specify only the direction, positive, negative, or neutral, of variable responses to shocks, based on theory.

In this blog, we’ll show you how to implement sign restriction identification using the new GAUSS procedure, svarFit, introduced in TSMT 4.0.

We’ll walk through how to:

  • Specify sign restrictions.
  • Estimate the SVAR model.
  • Interpret the resulting impulse response functions (IRFs).

By the end of this guide, you’ll have a solid understanding of how to apply sign restrictions to uncover meaningful economic relationships.

What are Sign Restrictions?

Sign restrictions are a method of identifying structural shocks in SVAR models by specifying the expected direction of response of endogenous variables.

Sign restrictions:

  • Do not impose exact constraints on parameter values or long-term impacts; they only require that impulse responses move in a particular direction for a specified period.
  • Are flexible and less reliant on strict parametric assumptions than other identification methods.
  • Rely on qualitative economic insights, making them less prone to model specification errors.

For example, in a monetary policy shock, economic theory might suggest that an increase in interest rates should lead to a decline in output and inflation in the short run. An SVAR sign restriction identification approach would enforce these directional movements.

Estimating SVAR Models in GAUSS

The svarFit procedure, available in TSMT 4.0, offers an all-in-one tool for:

  • Estimating reduced-form parameters of VAR models.
  • Implementing structural identification.
  • Deriving impulse response functions (IRFs), forecast error variance decompositions (FEVDs), and historical decompositions (HDs).

While the procedure provides intuitive defaults for quick and easy estimation, it also offers the flexibility to fully customize your model.

For a detailed, step-by-step walkthrough of the estimation process, refer to my previous blog post:
Estimating SVAR Models with GAUSS.
That post offers guidance on setting up the model, estimating reduced-form parameters, and performing structural identification.

Implementing Sign Restrictions with svarFit

The svarFit procedure allows you to specify sign restrictions as a structural identification method. This is done in three primary steps:

  1. Set the identification method to sign restrictions.
  2. Define the sign restriction matrix.
  3. Specify the shock variables and impacted horizons.

Example: Sign Restricted Responses to Supply, Demand, and Monetary Policy Shocks

Let's explore an empirical example capturing the dynamic relationships between inflation, unemployment, and the federal funds rate.

We’ll impose economically meaningful sign restrictions to identify three key shocks:

Shock Type Inflation Unemployment Federal Funds Rate
Supply Shock - - -
Demand Shock + - +
Monetary Policy Shock - + +

These restrictions allow us to apply economic theory to untangle the underlying structural drivers behind observed movements in the data.

Step One: Loading Our Data

The first step in our model is to load the data from the data_narsignrestrict.dta file.

/*
** Data import
*/
fname = "data_narsignrestrict.dta";
data_shortrun = loadd(fname);

Step Two: Specifying the VAR Model

In this example, we will estimate a SVAR(2) model which includes three endogenous variables and a constant:

lninflatt=c1+a11lninflatt1+a12lnfedfundst1+a13lnunemplt1+a14lninflatt2+a15lnfedfundst2+a16lnunemplt2+γ1t+u1tlnfedfundst=c2+a21lninflatt1+a22lnfedfundst1+a23lnunemplt1+a24lninflatt2+a25lnfedfundst2+a26lnunemplt2+γ2t+u2tlnunemplt=c3+a31lninflatt1+a32lnfedfundst1+a33lnunemplt1+a34lninflatt2+a35lnfedfundst2+a36lnunemplt2+γ3t+u3t

/*
** Specifying the model
*/
// Three endogenous variable
// No exogenous variables
formula = "lninflat + lnunempl + lnfedfunds";
// Specify number of lags
lags = 2;
// Include constant
const = 1;

Step Three: Set up Sign Restrictions

To set up sign restrictions we need to:

  1. Specify sign restrictions as the identification method using the ident input.
  2. Set up the sign restriction matrix using the irf.signRestrictions member of the svarControl structure.
  3. Define the restricted shock variables and the restriction horizon using the irf.restrictedShock and irf.restrictionHorizon members of the svarControl structure.
/*
** Sign restriction setup
*/
// Specify identication method
ident = "sign";
// Declare controls structure
// Fill with defaults
struct svarControl Sctl;
Sctl = svarControlCreate();
// Specify to use sign restrictions
Sctl.irf.ident = "sign";
// Specify which shock variable is restricted
Sctl.irf.restrictedShock = { 1, 2, 3 };
// Set up restrictions horizon
Sctl.irf.restrictionHorizon = { 1, 1, 1 };
// Set up restrictions matrix
// A row for each shock, and a column for each variable
// lninflat lnunempl lnfedfunds
// shock
// supply - - -
// demand + - +
// monetary - + +
Sctl.irf.signRestrictions = { -1 1 -1,
1 -1 1,
-1 1 1 };

Step Four: Estimate Model

Finally, we estimate our model using svarFit.

/*
** Estimate VAR model
*/
struct svarOut sOut;
sOut = svarFit(data_shortrun, formula, ident, const, lags, Sctl);

Calling the svarFit procedure loads the svarOut structure with results and automatically prints results to the screen.

=====================================================================================================
Model:                      SVAR(2)                               Number of Eqs.:                   3
Time Span:              1960-01-01:                               Valid cases:                    162
                        2000-10-01                                                                   
Log Likelihood:             406.137                               AIC:                        -13.305
                                                                  SBC:                        -12.962
=====================================================================================================
Equation                             R-sq                  DW                 SSE                RMSE

lninflat                          0.76855             2.10548            17.06367             0.33180 
lnunempl                          0.97934             4.92336             0.21507             0.03725 
lnfedfunds                        0.94903             2.30751             1.80772             0.10799 
=====================================================================================================
Results for reduced form equation lninflat
=====================================================================================================
          Coefficient            Estimate           Std. Err.             T-Ratio          Prob |>| t
-----------------------------------------------------------------------------------------------------

             Constant             0.06817             0.20780             0.32804             0.74332 
        lninflat L(1)             0.59712             0.07736             7.71851             0.00000 
        lnunempl L(1)            -1.14092             0.67732            -1.68448             0.09410 
      lnfedfunds L(1)             0.30207             0.25870             1.16765             0.24474 
        lninflat L(2)             0.25045             0.08002             3.12976             0.00209 
        lnunempl L(2)             1.05780             0.65416             1.61703             0.10790 
      lnfedfunds L(2)            -0.16005             0.26135            -0.61237             0.54119 
=====================================================================================================
Results for reduced form equation lnunempl
=====================================================================================================
          Coefficient            Estimate           Std. Err.             T-Ratio          Prob |>| t
-----------------------------------------------------------------------------------------------------

             Constant             0.01819             0.02333             0.77975             0.43673 
        lninflat L(1)             0.01173             0.00869             1.35062             0.17878 
        lnunempl L(1)             1.55876             0.07604            20.49928             0.00000 
      lnfedfunds L(1)             0.01946             0.02904             0.66991             0.50391 
        lninflat L(2)            -0.00899             0.00898            -1.00024             0.31875 
        lnunempl L(2)            -0.59684             0.07344            -8.12681             0.00000 
      lnfedfunds L(2)             0.00563             0.02934             0.19193             0.84805 
=====================================================================================================
Results for reduced form equation lnfedfunds
=====================================================================================================
          Coefficient            Estimate           Std. Err.             T-Ratio          Prob |>| t
-----------------------------------------------------------------------------------------------------

             Constant             0.16038             0.06764             2.37124             0.01896 
        lninflat L(1)             0.02722             0.02518             1.08115             0.28131 
        lnunempl L(1)            -1.14540             0.22046            -5.19558             0.00000 
      lnfedfunds L(1)             1.03509             0.08420            12.29300             0.00000 
        lninflat L(2)             0.04302             0.02605             1.65183             0.10059 
        lnunempl L(2)             1.09553             0.21292             5.14528             0.00000 
      lnfedfunds L(2)            -0.12063             0.08507            -1.41801             0.15820 
=====================================================================================================

Step Five: Visualize Dynamics

Once our model is estimated, we can gain insight into the system's dynamics by plotting:

  1. Impulse response functions.
  2. Forecast error variance decompositions.

First, let's look at the responses to a demand shock (lnunempl):

/*
** Visualizing dynamics
*/
// Plot IRFs of `lnunempl` shock
plotIRF(sOut, "lnunempl", 1);
// Plot FEVDs of `lnunempl` shock
plotFEVD(sOut, "lnunempl", 1);

The plotIRF procedure generates a grid plot of IRF to a shock : Impulse response functions to a demand shock using sign restricted SVAR.

The plotFEVD procedure generates an area plot of the FEVD: Factor error variance decompositions following a demand shock using sign restricted SVAR.

What Do We See in the IRF and FEVD Plots?

The dynamic responses to a demand shock in lnunempl provide useful insights into how the system behaves over time. Below, we highlight key observations from the forecast error variance decompositions (FEVDs) and impulse response functions (IRFs).

Forecast Error Variance Decomposition (FEVD)

The FEVD plot shows the contribution of each variable to the forecast variance of lnunempl over time:

  • In the short run (periods 0–2), lnunempl itself accounts for most of the variation.
  • As the forecast horizon increases, the role of lninflat grows, eventually contributing around 40% of the variation.
  • The largest and most persistent contribution comes from lnfedfunds, which stabilizes above 45%, highlighting its long-term influence on unemployment dynamics.
  • The share of lnunempl decreases steadily, dropping below 20% in later periods—suggesting that external variables explain more of the variation over time.

Impulse Response Functions (IRFs)

The IRFs to a shock in lnunempl display the dynamic responses of each variable in the system:

  • lninflat responds positively with a hump-shaped profile. It peaks around period 4–5 before gradually returning to baseline.
  • lnunempl initially declines but then reverses and increases slightly, indicating a short-run drop followed by a modest rebound.
  • lnfedfunds responds sharply with a peak around period 4, suggesting a monetary tightening reaction. The response tapers off over time but remains positive.

These dynamics are consistent with a demand-driven shock: falling unemployment puts upward pressure on inflation and triggers an increase in interest rates.

Step Six: Analyze Historical Decomposition

Next, we'll examine the historical decomposition of the lnunempl variable. Historical decompositions allow us to break down the observed movements in a variable over time into contributions from each structural shock identified in the model.

This provides valuable insight into which shocks were most influential during specific periods and helps explain how demand, supply, and monetary policy shocks have shaped the path of unemployment.

// Plot HDs for `lnunempl`
plotHD(sOut, "lnunempl", 1);

The plotHD procedure generates a time-series bar plot of the HD: Historical decompositions of unemployment using a sign restricted SVAR.

What We See in the HD Plot?

The HD plot shows the time-varying contributions of each structural shock to fluctuations in lnunempl:

  • Inflation shocks (lninflat) explain a significant share of unemployment increases in the middle portion of the sample. Their contribution is mostly positive during that period, suggesting inflationary pressure played a role in raising unemployment.

  • Unemployment shocks (lnunempl) dominate early and late periods of the sample. These are likely capturing idiosyncratic or residual variation not explained by the other two shocks.

  • Federal funds rate shocks (lnfedfunds) play a more modest but noticeable role during downturns. Their influence is generally negative, suggesting that monetary tightening helped reduce unemployment volatility in those windows.

Overall, the decomposition illustrates that no single shock dominates throughout the entire sample. Different drivers shape the evolution of unemployment depending on the macroeconomic context.

Conclusion

Today's blog demonstrates how sign restriction identification in SVAR models can provide meaningful insights into the structural dynamics behind key macroeconomic variables.

Using economically motivated sign restrictions, we were able:

  • Uncover and interpret the dynamic responses to different shocks.
  • Visualize the relative importance of each shock over time.
  • Trace the evolving drivers of unemployment through historical decomposition.

These findings show how SVAR models, when combined with flexible identification strategies like sign restrictions, offer a powerful framework for modeling complex macroeconomic interactions.

Further Reading

  1. Introduction to the Fundamentals of Time Series Data and Analysis
  2. Introduction to the Fundamentals of Vector Autoregressive Models
  3. The Intuition Behind Impulse Response Functions and Forecast Error Variance Decomposition
  4. Introduction to Granger Causality
  5. Understanding and Solving the Structural Vector Autoregressive Identification Problem
  6. The Structural VAR Model at Work: Analyzing Monetary Policy
Leave a Reply