0% found this document useful (0 votes)
10 views35 pages

Scenario Analysis With Multivariate Bayesian Machine Learning Models

This paper presents a framework for scenario analysis using multivariate Bayesian machine learning models, specifically focusing on nonlinear and nonparametric approaches. It demonstrates the application of this framework through simulated data and three real-world scenarios, including conditional forecasts aligned with Federal Reserve stress tests and the impact of US financial shocks on international markets. The findings highlight the significance of nonlinearities and asymmetries in the relationships between macroeconomic and financial variables.

Uploaded by

Hoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views35 pages

Scenario Analysis With Multivariate Bayesian Machine Learning Models

This paper presents a framework for scenario analysis using multivariate Bayesian machine learning models, specifically focusing on nonlinear and nonparametric approaches. It demonstrates the application of this framework through simulated data and three real-world scenarios, including conditional forecasts aligned with Federal Reserve stress tests and the impact of US financial shocks on international markets. The findings highlight the significance of nonlinearities and asymmetries in the relationships between macroeconomic and financial variables.

Uploaded by

Hoang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Scenario analysis with multivariate

Bayesian machine learning models


Michael PFARRHOFER Anna STELZER
WU Vienna Oesterreichische Nationalbank
arXiv:2502.08440v1 [econ.EM] 12 Feb 2025

We present an econometric framework that adapts tools for scenario analysis, such

as conditional forecasts and generalized impulse response functions, for use with

dynamic nonparametric multivariate models. We demonstrate the utility of this

approach through an exercise with simulated data, and three real-world applica-

tions: (i) scenario-based conditional forecasts aligned with Federal Reserve Bank

stress test assumptions, (ii) measuring macroeconomic risk under varying financial

conditions, and (iii) the asymmetric effects of US-based financial shocks and their

international spillovers. Our results indicate the importance of nonlinearities and

asymmetries in the dynamic relationship between macroeconomic and financial

variables.

JEL: C11, C32, C53, C54

Keywords: conditional forecast, generalized impulse response function, Bayesian

additive regression trees, nonlinearities, (semi)-structural inference

Contact: Michael Pfarrhofer ([email protected]), Department of Economics, WU Vienna Uni-


versity of Economics and Business. We would like to thank Niko Hauzenberger for useful comments.
Disclaimer: The views expressed in this paper do not necessarily reflect those of the Oesterreichische
Nationalbank or the Eurosystem.
1. INTRODUCTION

In this paper, we discuss how to conduct scenario analysis with multivariate time series
models in a macroeconomic context when the functional form of the conditional mean
is nonlinear and/or unknown. This situation can arise when relying on “traditional”
nonlinear frameworks (e.g., in variants of threshold, regime-switching, or time-varying
parameter models, see Fischer et al. (2023) for a recent example), but is virtually always
the case in recently developed models that introduce Bayesian machine learning (ML)
techniques to multivariate macroeconometric modeling (see, e.g., Huber and Rossini, 2022;
Clark et al., 2023; Huber et al., 2023; Hauzenberger et al., 2024c).
We use the term scenario analysis broadly to refer to different types of counterfac-
tual experiments, including a version of conditional forecasts and variants of generalized
impulse response functions (GIRFs, see Koop et al., 1996). While some aspects and is-
sues in this context have been discussed in isolation in the aforementioned papers, there
is no unified explicit treatment or comprehensive framework available yet. Inspired by
the closely related work of Crump et al. (2025), which focuses on a linear Bayesian vector
autoregression (VAR), this is the gap in the literature that we aim to fill with our paper.
Conditional forecasts — the simulation of the future path of selected variables con-
ditional on predefined scenarios encoded in constraints placed on observed variables —
have been used by academics and practitioners since the 1980s in a linear VAR context
(see, e.g., Doan et al., 1984), with subsequent refinements and improvements in compu-
tational efficiency (see, e.g., Waggoner and Zha, 1999; Jarociński, 2010; Bańbura et al.,
2015). A recent and highly efficient computational approach is developed in Chan et al.
(2025). Their framework exploits the properties of conditionally Gaussian errors in con-
junction with the common assumption of a known linear conditional mean relationship.
The full future path of restricted and unrestricted forecasts across multiple horizons can
be jointly sampled from a high-dimensional (potentially truncated) multivariate Gaussian
distribution.
Breaking the assumption of linearity complicates matters. In particular, the presence

2
of nonlinearities makes it difficult to derive multi-step ahead predictive distributions, and
in many cases it will be outright impossible to obtain closed-form solutions. In this case,
one can resort to recursive predictive simulation. This paper discusses how common
approaches to conditional forecasting can be adapted to the context of nonparametric
multivariate models. The proposed approach is quite general in the sense that it can be
used in conjunction with most popular frameworks that introduce nonlinearities in the
conditional mean of multivariate models. The key assumption is that the reduced form
errors are conditionally multivariate Gaussian.
Since the impulse response function (IRF), another key macroeconomic estimand, is
commonly defined as the difference between forecasts conditioned on the values of different
shocks, our proposed framework is also useful for semi-structural scenario analysis in a
nonlinear context (see Antolin-Diaz et al., 2021, for an excellent discussion when using
linear structural VARs, SVARs). Specifically, we revisit the issue of how to obtain dynamic
causal effects, in the form of GIRFs, in a nonlinear and possibly nonparametric context.
We examine both unrestricted GIRFs to shocks identified with approaches typically used
in the linear SVAR literature, and restricted GIRFs, which can be used to investigate
and quantify the contributions of specific sets of transmission channels in the propagation
of structural shocks. The latter are obtained by partially matching the moments of the
unconditional and conditional predictive distributions used to compute the GIRFs.
We mentioned above that the proposed approach is quite generally applicable in mul-
tivariate models whenever one is willing to assume conditionally Gaussian innovations.
This means that there is a large number of potential candidates for the respective condi-
tional mean functions that can be assumed. These choices include (but are not limited
to) regression tree-based implementations, Gaussian process priors, or neural networks
(see Marcellino and Pfarrhofer, 2024, for a recent Bayesian overview). For our empirical
work, we use Bayesian Additive Regression Trees (BART, Chipman et al., 2010) as a
specific nonparametric implementation to infer functional relationships in a multivariate
time series model. We pick this sum-of-trees model because tree-based approaches have
proven particularly capable of producing accurate forecasts when used with time series

3
data for the US economy (see, e.g., Medeiros et al., 2021; Goulet Coulombe et al., 2022;
Clark et al., 2023; Goulet Coulombe, 2024), with datasets typically structured similarly
to the one we use in this paper.
Our approach to scenario analysis is developed under the assumption of a multivari-
ate Gaussian error term with a general time-varying covariance matrix. From a practical
and implementation perspective, we rely on a somewhat simplified version to capture
time variation of the respective volatilities. The framework allows for flexible equation-
by-equation estimation of the multivariate system and offers significant improvements in
computational efficiency also in the context of conditional forecasts and GIRFs. In our
empirical work, we capture heteroskedastic features of the data with a specification related
to common volatility approaches (see Carriero et al., 2016), which also reflects recent tools
used to address outliers during the Covid-19 pandemic (see, e.g., Carriero et al., 2024).
It is worth noting that all methods also work with more sophisticated volatility models
(see, e.g., Chan, 2023), albeit at the cost of increased computational burden.
After investigating the performance our approach with synthetic data, we apply our
framework in several related yet distinct cases. Our dataset comprises about 25 quarterly
macroeconomic and financial variables for the US economy ranging from the mid-1970s
to the last quarter of 2023. In one of our explorations, we also add some international
variables and include data from the euro area (EA), Japan, and the United Kingdom
(UK) in our model. The applied work assesses and illustrates the role of nonlinearities
when interest centers on conditional forecasts, and we also explore asymmetries in the
propagation of structural shocks of different signs and magnitudes. Specifically, we provide
three empirical applications. First, inspired by Chan et al. (2025), we use a subset of the
assumptions underlying the annual stress test conducted by the Federal Reserve System
and compute conditional forecasts using soft constraints for different scenarios, comparing
predictive densities from linear and nonlinear models. Second, reflecting the growth-
at-risk literature (see Adrian et al., 2019), we study the counterfactual implications of
varying financial conditions (imposing hard constraints over a period) on tail risks of
output growth, inflation, and employment. Third, we identify a US-based financial shock

4
(as in, e.g., Barnichon et al., 2022), and compute GIRFs to shocks of different signs and
magnitudes that are allowed to propagate internationally. We then use a restricted GIRF
approach to gauge the role of spillovers and spillbacks.
The rest of this paper is structured as follows. Section 2 lays out the baseline
econometric framework and discusses an implementation using BART. Section 3 provides
remarks about obtaining predictive inference with Monte Carlo methods. We discuss how
to impose hard and soft constraints on forecasts, and how these constraints may be used
to construct semi-structural scenarios through generalized impulse response functions.
Section 4 provides an empirical illustration of the proposed methods. The last section
concludes.

2. ECONOMETRIC FRAMEWORK

Let yt = (y1t , . . . , ynt )′ collect n variables for t = 1, . . . , T, and xt = (yt−1


′ ′
, . . . , yt−p )′ is a
k × 1 vector that stacks lags of yt , thus k = np. We use a multivariate model of the form:

yt = F (xt ) + ϵt , ϵt ∼ N (0n , Σt ), (1)

where F (xt ) = (f1 (xt ), . . . , fn (xt ))′ is an n-vector of conditional mean functions fi (xt ) :
Rk → R for i = 1, . . . , n, such that F (xt ) : Rk → Rn . One may assume a specific
functional form for the fi (xt )’s or treat them as unknown and estimate them. The methods
we discuss in this paper are designed specifically for the latter case. We assume zero mean
Gaussian errors ϵt with n × n time-varying covariance matrix Σt .

2.1. Multivariate system estimation

To estimate the multivariate (reduced form) model in Equation (1) efficiently from a
computational perspective, we rely on a conditional representation of its n equations. Let
ei of size 1 × n denote the ith row of an identity matrix In , and Ei of size (n − 1) × n

5
is the matrix resulting from deleting the ith row of In . Using y−it = Ei yt we may write
yt = e′i yit +Ei′ y−it . Under the assumptions of Equation (1) one may derive the conditional
distribution:1

 
1 −1 ′ 2 −1 ′
p(yit |y−it , •) ∝ exp − (ei Σt ei yit − 2yit ei Σt (F (xt ) − Ei y−it )) ,
2

which is a Gaussian with variance ςit2 = (ei Σ−1 ′ −1


t ei ) and mean µit = ςit2 (ei Σ−1
t (F (xt ) −

Ei′ y−it )). Indeed, this distribution is equivalent to a more common representation of the
conditional multivariate Gaussian (see, e.g., Cong et al., 2017, Section 2, Equation 5).
The mean can alternatively be written as µit = fi (xt ) + ςit2 (ei Σ−1 ′
t Ei )(y−it − Ei F (xt )),

and we define µ̃it = ςit2 (ei Σ−1 ′


t Ei )(y−it − Ei F (xt )), i.e., µit = fi (xt ) + µ̃it .

The ith equation of the multivariate model in regression form, conditional on all
other equations, is then given by:

(yit − µ̃it ) = fi (xt ) + uit , uit ∼ N (0, ςit2 ), (2)

which can be used in a Gibbs sampler to update the conditional mean relationships by
looping through equations i = 1, . . . , n. This approach is similar to the one of Esser
et al. (2024) and allows to treat each equation of the multivariate system individually,
conditional on all other equations.

1
Earlier related contributions often either use a mapping between the structural and reduced form of
the VAR to enable equation-by-equation estimation (see, e.g., Hauzenberger et al., 2024c), or rely on
factor models for the reduced form errors (see, e.g., Clark et al., 2023). These approaches come with
computational and inferential advantages and disadvantages. The former is simple to implement but
requires parameterizing the structural form which may cause associated issues such as breaking order-
invariance of the equations. The latter allows for order-invariant inference but gives rise to the usual
identification challenges of factor models. Our proposed approach allows for directly working with the
reduced form model, and obtaining order-invariant inference.

6
2.2. Bayesian Additive Regression Trees

The approach we discuss in Section 3 works with any implementation of multivariate


models with jointly Gaussian errors. That is, assuming a linear functional form for F (xt )
results in a standard BVAR.2 In case we choose to treat F (xt ) nonparametrically, sev-
eral options are available. Due to its versatility and the established favorable empirical
properties we mentioned earlier, we use BART to approximate the equation-specific func-
tions in our applied work. That is, we consider a sum of s = 1, . . . , S, tree functions
ℓis (xt | Tis , mis ):

S
X
fi (xt ) ≈ ℓis (xt | Tis , mis ),
s=1

where Tis are regression trees and mis is a vector of terminal node parameters (which serve
as fitted values). Instead of having a single but complex tree, BART is akin to ensemble
methods, and uses a sum of many simple trees (“weak learners”), which has been shown
to work well empirically.
Using BART requires an algorithm that estimates splitting variables and thresholds
for which we specify suitable priors that together yield p(Tis ); we further need a prior on
the terminal node parameters p(mis |Tis ). Our setup follows Chipman et al. (2010) and
we first define the probability that a tree ends at a specific node at depth d = 0, 1, 2, . . . ,
as α/(1 + d)β , with α ∈ (0, 1) and β ∈ R+ . This prevents trees from getting overly
complex and provides regularization (here, we rely on the default values α = 0.95, and
β = 2, which perform well across many datasets). For the splitting variables, we choose
a uniform prior. This implies that each predictor is equally likely to be selected as a
splitting variable. We further assign a uniform prior to all thresholds within the splitting
rules, based on the range of the respective splitting variable.

2
When we consider linear versions of our model for comparisons, we implement this setting with F (xt ) =
Axt where A is an n × k matrix of reduced form VAR coefficients. We assume a horseshoe prior with a
single global shrinkage parameter on these coefficients, see also Hauzenberger et al. (2024b). Equation (2)
can be used to update the VAR coefficients equation-by-equation from their usual Gaussian posteriors.

7
Next we specify the prior for the terminal node parameters. On these parameters
mis,l , for l = 1, . . . , #TNis , where #TNis denotes the number of terminal node parameters
of tree s in equation i, we impose independent conjugate Gaussian priors that are sym-
metric across trees and identical for all terminal nodes. As suggested by Chipman et al.
(2010) the moments of these priors are chosen in a data-driven manner, such that 95%
of the prior probability lies in the interval (min(yi ), max(yi )), where yi = (yi1 , . . . , yiT )′ ,
and such that shrinkage increases the more trees S are chosen for estimation. We choose
S = 250 trees which has been shown to work well for typical macroeconomic time series
applications (see, e.g., Huber et al., 2023).

2.3. Priors on other model parameters

The methods discussed in this paper work with a general time-varying covariance matrix
Σt . Significant computational advantages, however, are available if one assumes that
Σt = st Σ, i.e., that the covariance structure only varies proportionally over time. The
prior setup for the constant part of the covariance matrix follows Esser et al. (2024).
Specifically, we use a hierarchical inverse Wishart prior:

Σ|{ai }ni=1 ∼ W −1 (s0 , S0 ),

where s0 = ν + n − 1, S0 = 2ν · diag(1/a1 , . . . , 1/an ) and ai ∼ G −1 (1/2, 1/A2j ) for i =


1, . . . , n, and a fixed scale parameter Aj > 0; see also Huang and Wand (2013). Setting
ν = 2 implies a comparatively uninformative prior about the implied correlation structure,
different from fixed-hyperparameter versions of this prior.
In case we model time-varying variances, we follow Carriero et al. (2024) and assume
that:


1/2
1
 with probability 1 − p
st =

U(2, s) with probability p,

8
where U(2, s) is a discrete uniform distribution with (integer) support between 2 and
s = 6 and p ∼ B(ap , bp ) is the probability associated with observing an outlier. Alter-
native models related to common stochastic volatility specifications are available in this
context. More flexible approaches, such as those discussed in Chan (2020, 2023), are
straightforward to implement, but may significantly increase the computational burden.

2.4. Posterior distributions and sampling algorithm

We may use the conditional distribution in Equation (2) to update the trees equation-
by-equation using the backfitting approach designed by Chipman et al. (2010); see also
Esser et al. (2024). Here, one may define the vector of partial residuals

!
X
∼ N ℓis (xt | Tis , mis ), ςit2 ,

ỹis,t = yit − µ̃it − ℓij (xt | Tij , mij )
j̸=s

conditioning on the fit of each of the S − 1 trees except tree s and information in all but
the ith equation. In full data notation, ỹis = (ỹis,1 , . . . , ỹis,T )′ , this defines a conditionally
Gaussian likelihood, p(ỹis | Tis , mis , •), which can be marginalized analytically over the
terminal node parameters mis (to keep the dimensionality of the inferential problem fixed).
Combining this conditional likelihood with the prior on the trees, and a suitable
transition density (based on four distinct moves: grow a terminal node, prune a terminal
node, change a splitting rule, swap a child/parent node), the trees are sampled using a
standard accept/reject Metropolis-Hastings algorithm. These trees (and associated rules)
partition the input space and we obtain a distinct set of observations for each terminal
node. The posterior then takes the conventional Gaussian form for these parameters.
Updating all trees s = 1, . . . , S, across equations i = 1, . . . , n, yields an updated fit

that can be used to compute the outlier-adjusted residuals ϵt / st = yt − F (xt ). The
posterior of the constant part of the covariance matrix is then given by:

T
!
X
Σ | • ∼ W −1 s0 + T, S0 + s−1 ′
t ϵt ϵt
t=1

9
The hierarchical parameters of the prior on the covariance matrix can be updated using:

 
−1 ν+T 1 −1
ai | • ∼ G , 2 + ν · Σ[ii] ,
2 Ai

where Σ−1 −1
[ii] denotes the ith diagonal element of Σ . The outlier adjustment parameter

st can be sampled, due to its discrete support, using the probabilities:

1/2
Pr(st = 1 | yt , F (xt ), Σ, p) ∝ N (yt | F (xt ), Σ) · (1 − p),
1/2
Pr(st = s | yt , F (xt ), Σ, p) ∝ N (yt | F (xt ), sΣ) · (p/(s − 1)) , for s = 2, 3, . . . , s,

on a t-by-t basis. The posterior distribution of the outlier probability is p | • ∼ B(ap +


To , bp + T − To ), with the total number of observations classified as outliers denoted by
To = Tt=1 I(st ̸= 1), where I(•) is an indicator function that yields 1 if its argument is
P

true and 0 otherwise.


This completes our modeling framework and algorithmic implementation. We turn
to the issue of predictive and structural inference next.

3. PREDICTIVE SIMULATION

Define a vector Ξ that contains all coefficients and latent variables necessary to parame-
terize Equation (1). At time τ , the one-step-ahead predictive distribution is given by the
integral:

Z
p(yτ +1 | I) = p(yτ +1 | I, Ξ)p(Ξ | I)dΞ, (3)

where I denotes the respective information set used to infer Ξ. For out-of-sample fore-
casts, I is typically given by {yt }τt=1 , and we are interested in predicting yτ +h | {yt }τt=1
for h = 1, 2, . . . , steps ahead. In other cases we may also want to condition on the full
information set, i.e., I is given by {yt }Tt=1 , to compute hypothetical scenarios in-sample
for τ ∈ {1, 2, . . . , T } using the distribution of yτ +h | {yt }Tt=1 conditional on parameters

10
informed by the full information set. In either case, the distribution p(yτ +1 | I) in gen-
eral does not take a well-known form, and neither does the distribution of higher-order
forecasts for h ≥ 2.
However, we may still explore and obtain random samples from them via predictive
simulation. This involves exploiting the fact that even though p(yτ +1 | I) is unknown,
p(yτ +1 | I, Ξ) takes a conditionally Gaussian form under the quite flexible model of Equa-
tion (1). Let m denote the current iteration of the MCMC algorithm and x(m) indicates
the mth draw of a random variable. The one-step-ahead predictive distribution is given
by:

(m)
p(yτ +1 | I, Ξ(m) ) = N (F (m) (xτ +1 ), Στ +1 ), (4)

where xτ +1 = (yτ′ , . . . , yτ′ −p+1 )′ . For h ≥ 2 we may iterate forward, conditioning re-
(m)
cursively on the draws for preceding horizons, by setting the predictors to xτ +h =
(m) (m)
(yτ +h−1 ′ , yτ +h−2 ′ , . . .)′ , and obtain:

(m) (m) (m)


p(yτ +h | I, yτ +1:τ +h−1 , Ξ(m) ) = N (F (m) (xτ +h ), Στ +h ), (5)

(m)
where yτ +1:τ +h−1 denotes the path of the variables from τ + 1 to τ + h − 1 and yτ +1:τ +h =
(yτ′ +1 , . . . , yτ′ +h )′ . This exploits the fact that:

Z h
Y
p(yτ +1:τ +h | I) = p(yτ +1 | I, Ξ) p(yτ +j | yτ +1 , . . . , yτ +j−1 , I, Ξ)p(Ξ | I)dΞ, (6)
j=2

that is, the joint distribution of forecasts can be decomposed into the product of the con-
ditional one-step ahead predictive densities. Simulating the process forward, by sampling
from the distribution in Equation (5) across horizons h = 1, 2, . . . , in each sweep of our
algorithm, delivers draws from p(yτ +1:τ +h | I), via Monte Carlo integration.

11
3.1. Conditional forecasts

Suppose we want to impose restrictions on a predefined path of one or more variables.


Formally, this implies an additional conditioning argument for the predictive distribution,
see also Crump et al. (2025) for related discussions. In this context, we denote by Ch a
set that defines the desired restrictions at horizon h = 1, 2, . . . , i.e., the unconditional
forecast results when Ch = ∅ for all h, and C1:h = {C1 , . . . , Ch }. In our version, interest
centers on the conditional distribution p(yτ +1:τ +h | I, C1:h ), which in line with Equation
(6) can written as:

Z
p(yτ +1:τ +h | I, C1:h ) = p(yτ +1:τ +h | I, C1:h , Ξ)p(Ξ | I)dΞ,
h
Y
p(yτ +1:τ +h | I, C1:h , Ξ) = p(yτ +1 | I, C1 , Ξ) p(yτ +j | yτ +1 , . . . , yτ +j−1 , I, C1:j , Ξ).
j=2

That is, we again decompose the joint distribution across horizons as a product of the
sequence of conditional one-step ahead distributions. We thus impose the restrictions h-
by-h recursively at each point in time and jointly simulate the restricted and unrestricted
variables forward for each iteration of our sampling algorithm.
Notably this differs from the “traditional” implementation of conditional forecasts,
that impose the conditions as p(yt+j | C1:h , •) instead of p(yt+j | C1:j , •) for j = 1, . . . , h.
Put simply, our approach “filters” forward in a loose sense of the word by conditioning on
the history of restrictions, thereby resulting in a future path of the unrestricted variables
that is consistent with the imposed restrictions over the full set of horizons. By contrast,
versions in the spirit of Waggoner and Zha (1999) condition on future restrictions as well
as past (and current) ones at each horizon, either by drawing the entire paths of the
reduced form shocks or by smoothing via backwards recursions (see Bańbura et al., 2015,
for an excellent discussion).
In static multivariate problems these two approaches coincide, while, intuitively,
they will potentially lead to increasingly different results as the persistence of the under-
lying dynamic processes increases. We explore this apparent limitation and the practical

12
usefulness of our approach below in an exercise using artificial data. For dynamic sys-
tems featuring a small to moderate amount of persistence (e.g., as in typical applications
with monthly/quarterly macroeconomic and financial data that are transformed towards
approximate stationarity), the two versions’ outputs are usually close.
Constraints. We operationalize two distinct versions of the restrictions. Define the selec-
tion matrix Rh of size rh ×n, where rh is the number of restrictions which may vary across
horizons. This matrix serves to select the respective restricted variables. There are two
main cases of importance: hard and soft constraints. In the former case, some variables
exactly follow a predetermined path; in the latter, they lie within a predetermined inter-
val. As this interval narrows, the soft-constrained case approaches the hard-constrained
one. We store these restrictions in the vector rh of size rh × 1, whereas rh and rh , both
of size rh × 1, denote the lower and upper bounds of an interval. For hard constraints,
we have an equality restriction (see Equation 7), while the soft constraints require an
inequality restriction (see Equation 8):

Ch = {Rh yτ +h = rh }, (7)

Ch = {rh ≤ Rh yτ +h ≤ rh }. (8)

To simplify notation, we omit the m-superscript that labels MCMC draws in what
follows, but stress that the following computations are carried out in each sweep of our
sampling algorithm, thereby marginalizing over the parameters. In addition, define the
matrix Uh of dimension (n − rh ) × n, which mirrors the selection matrix Rh and is used to
(R)
select all unrestricted variables. Define the restricted, yτ +h = Rh yτ +h , and unrestricted,
(U )
yτ +h = Uh yτ +h , subvectors of yτ +h . Similar to the derivation in Section 2.1 and as in
Chan et al. (2023), using Equation (5), we may then write:

(R) (U )
yτ +h =Rh′ yτ +h + Uh′ yτ +h ,
(R) (U )
Rh′ yτ +h + Uh′ yτ +h ∼ N (F (xτ +h ), Στ +h ).

13
(U ) (R)
This representation can be used to obtain the conditional distribution p(yτ +h | yτ +h =
rh , •), which is proportional to:

 
1 (U ) ′ −1 ′ (U ) (U ) ′ −1 ′ (R)
exp − (yτ +h Uh Στ +h Uh yτ +h − 2yτ +h Uh Στ +h (F (xτ +h ) − Rh yτ +h )) .
2

This is the kernel of a Gaussian distribution, so under the hard restriction in Equation
(7), we obtain:

(U ) (R) (U ) (U )
yτ +h | yτ +h = rh , • ∼ N (mτ +h , Sτ +h ), (9)

(U ) (U ) (U ) (R)
with moments Sτ +h = (Uh Σ−1 ′ −1
τ +h Uh ) and mτ +h = Sτ +h (Uh Σ−1 ′
τ +h (F (xτ +h ) − Rh yτ +h )).

The inequality restrictions of Equation (8) imply that the conditional forecast of in-
(R)
terest, p(yτ +h | rh ≤ yτ +h ≤ rh , •), follows a truncated multivariate Gaussian distribution.
Since typically only a subset of variables is restricted (i.e., rh ≤ n), Chan et al. (2025)
suggest a blocked updating scheme to unlock computational advantages. Note that one
may decompose the joint distribution of the restricted and unrestricted variables into two
parts, and first sample from the rh -dimensional (rather than n-dimensional) truncated
multivariate Gaussian:

(R) (R) (R) (R) (R)


yτ +h | rh ≤ yτ +h ≤ rh , • ∼ N (mτ +h , Sτ +h ) · I(rh ≤ yτ +h ≤ rh ),

(R) (R)
with moments Sτ +h = Rh Στ +h Rh′ and mτ +h = Rh F (xτ +h ). An iid draw from this
(R,m)
distribution, yτ +h , can be obtained from this distribution using the minimax tilting
(R,m)
method of Botev (2017). On may then set rh = yτ +h , and use Equation (9) to draw the
unconstrained forecasts.
Simulation. To assess the performance and implications of our recursive approach
relative to alternative “traditional” implementations of conditional forecasts, we provide
a comparison with the precision sampler proposed in Chan et al. (2025). Assuming the
conditional mean function to be linear allows to contrast both algorithms one-to-one (we
cannot use the precision sampler for nonlinear implementations). For this purpose, we

14
(a) hard constraints, moderate persistence (b) soft constraint, moderate persistence
1 2 3 1 2 3
0.4 0.4
0.2 0.2
CF

CF
0.0 0.0
−0.2 −0.2
−0.4 −0.4
5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20
Horizon Horizon

(c) hard constraints, high persistence (d) soft constraint, high persistence
1 2 3 1 2 3
0.4 0.4
0.2 0.2
CF

CF
0.0 0.0
−0.2 −0.2
−0.4 −0.4
5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20 5 10 15 20
Horizon Horizon

Figure 1: Conditional forecast (CF) under moderate and high levels of persistence of the
underlying data generating process process (DGP).
Notes: Variables 1, 2, 3. Lines refer to the percentiles 16/50/84 of the predictive distributions (solid grey:
recursive simulation; dashed navy blue: precision sampling). The DGP is a VAR with n = 6 variables
and p = 4 lags. The scenario hard constraints conditions on the realizations of three variables and leaves
the others unrestricted; soft contraint restricts one of the variables to a predefined interval.

simulate artificial data from a linear VAR process with n = 6, p = 4 and a maximum
horizon h = 20 for different levels of persistence (which we measure through spectral radius
ρ(Ã), i.e., the maximum absolute eigenvalues of the companion matrix of the VAR, Ã).
We label ρ(Ã) ≈ 0.6 as moderate persistence, and ρ(Ã) ≈ 0.95 as high persistence. The
scenario hard constraints treats the first three variables as missing and conditions on the
realizations of the remaining variables; soft contraint restricts one of the variables to the
predefined interval (µy − 0.1, µy + 0.1) where µy = 1/h Tt=T −h+1 yi,t , i.e., the mean of the
P

respective variable over its final h in-sample periods.


The resulting conditional forecasts are shown in Figure 1. The solid grey lines mark
the 68 percent credible set and the median of the predictive distribution when using our
proposed recursive approach; the dashed navy blue lines show the same percentiles when
using the precision sampler. Considering panels (a) and (b), when facing a moderate
amount of persistence, the two approaches yield virtually identical estimates. Some devi-
ations are visible in panels (c) and (d), especially for the left-most panel under the hard
constraints and for the first two variables under the soft restriction. In the majority of

15
our experiments, the differences were practically negligible. But this is not necessarily
the case in all conceivable scenarios.

3.2. Generalized impulse responses

The IRF is a ubiquitous object of interest in macroeconomics and is widely used for both
academic and policy analysis. For the purposes of our paper, we follow the literature and
define IRFs generically as:

∂yτ +h
= E(yτ +h | I, ujτ = d) − E(yτ +h | I). (10)
∂ujτ

As their name suggests, IRFs trace the dynamic evolution of one or more variables in
response to an exogenous structural shock impact (the “impulse”) of size d at time τ
across horizons h, where the structural shock is encoded in ujτ . Conventional IRFs from
(conditionally) linear VARs are symmetric and proportional with respect to the sign and
size of shocks, and they are time-invariant, at least in the case of constant parameter
VARs. By contrast, in nonlinear models such as those we consider in this paper, the sign,
size, and timing of a shock may matter and can lead to nonlinearities in responses. Due
to this state dependence, we cannot use standard methods but need to resort to GIRFs
instead, see Koop et al. (1996). We discuss our implementation of GIRFs below and then
extend the baseline framework to allow for studying various types of counterfactual shock
and transmission scenarios.
The model outlined in Equation (1) is conditionally Gaussian, and standard ap-
proaches from the SVAR literature (e.g., zero/sign restrictions, instrumental/proxy vari-
ables) can be used to identify structural shocks. Suppose we have (either internally or
externally) identified the impact of the structural shock ujτ of size d = 1 on the endogenous
(m)
variables of interest, ∂yτ /∂ujτ = δ0 at iteration m. To sample from the posterior distri-
bution of the GIRFs across horizons, we will use the conditionally Gaussian form of Equa-
tion (3). Our goal here is to compare factual and counterfactual scenarios, i.e., we want
to compare the case when a structural shock occurs with a non-shock baseline scenario.

16
We construct these scenarios by first defining two distinct versions of initial conditions.
(m,d) (m)
In particular, xτ +1 = ((yτ + dδ0 )′ , yτ′ −1 , . . . , yτ′ −p+1 )′ , with superscript d indicating the
(m,∅)
shock scenario for each iteration m of our algorithm, and xτ +1 = (yτ′ , yτ′ −1 , . . . , yτ′ −p+1 )′
with superscript ∅ referring to the “no-shock” scenario, i.e., it uses the actual configura-
tion of the input vector at time τ . Let J be a k × n selection matrix which has an identity
matrix in its upper n × n block and zeroes everywhere else.
The GIRF on impact reflects our desired shock scenario and is given by:

(m,d) (m,d) (m,∅) (m)


λτ,0 = J ′ (xτ +1 − xτ +1 ) = dδ0 .

That is, we assume that the impact of the respective shock is constant over time, and
shocks of different sizes can be simulated by setting d accordingly. Using Equation (4),
we obtain two predictive distributions of interest:

(m,d)
p(yτ +1 | ujτ = d, I, Ξ(m) ) = F (m) (xτ +1 ) + ϵτ +1 ,
(m,∅)
p(yτ +1 | I, Ξ(m) ) = F (m) (xτ +1 ) + ϵτ +1 ,

(m)
where ϵτ +1 ∼ N (0n , Στ +1 ). In line with the definition of an IRF in Equation (10), at
(m,d) (m,d) (m,∅)
horizon h = 1, we have λτ,1 = F (m) (xτ +1 ) − F (m) (xτ +1 ). For higher-order responses
h ≥ 2, we may iterate forward, sampling from the distribution of the future (reduced form)
shocks to obtain draws from the unconditional predictive distribution and the distribution
conditioning on a shock at time τ for each horizon. Specifically, for s ∈ {d, ∅} and
(m,s) (m,s) (m,s)
analogous to Equation (5), we have xτ +h = (yτ +h−1 ′ , yτ +h−2 ′ , . . .)′ and thus,

(m,s) τ +h−1 (m,s) (m)


p(yτ +h | ujτ = s, I, {yt }t=τ +1 , Ξ(m) ) = N (F (m) (xτ +h ), Στ +h ), (11)

17
which we use to compute the GIRF at generic horizon h:

(m,d) (m,d) (m,∅)


λτ,h = E(yτ +h | I, ujτ = d, yτ +1:τ +h−1 , Ξ(m) ) − E(yτ +h | I, yτ +1:τ +h−1 , Ξ(m) ) (12)
(m,d) (m,∅)
= F (m) (xτ +h ) − F (m) (xτ +h ).

Two main comments about this framework are in order. First, for the case when F is a
linear function, our approach produces conventional IRFs. Second, when F is nonlinear,
one cannot apply expectations as straightforwardly as in the linear case. The reason is that
when applying the logic of standard recursive substitutions in this context, the presence
of nonlinearities complicates the moments of higher-order responses. For instance, taking
h = 2 as an example, when F is a linear mapping with associated (companion form)
coefficients, Ã, we obtain E(Ã2 xτ +1 + Ãϵτ +1 + ϵτ +2 ) = Ã2 xτ +1 . That is, the IRF at
(m,d) (m,∅) (m,d) (m,∅) (m) ′
horizon h is given by J ′ Ãh (xτ +1 − xτ +1 ) where xτ +1 − xτ +1 = (dδ0 , 0′n(p−1) )′ ,
and can be obtained by simply projecting the shock impact forward using powers of
Ã. Since d can be factored out and the initial conditions cancel, the IRFs are time-
invariant, symmetric, and proportional for different shock sizes and signs. By contrast, in
a more general and possibly nonlinear context, this is clearly not the case since we obtain
E[F (F (xτ +1 + ϵτ +1 )) + ϵτ +2 ] ̸= F (F (xτ +1 )), that is, e.g., at h = 2 the shock dated τ + 1
enters nonlinearly, and so on.
Equation (12) thus addresses the reduced form shocks that enter nonlinearly to
obtain the respective conditional expectation (implicitly via the recursive simulation of the
(m,s) (m,d)
factual and counterfactual paths of the variables yτ +1:τ +h−1 ). Computing λτ,h for each
iteration m allows us to explore the posterior of the expression in Equation (10). Notably,
we obtain a GIRF across horizons h = 0, 1, 2, . . . , for each point in time τ . In principle,
one may thus consider dynamic time-varying effects of shocks for different subsets of
observations (e.g., recessions vs. expansions), or for each period individually. For most of
(m,d) (m,d)
= 1/T Tτ=1 λτ,h , and
P
our empirical work, we will focus on simple time averages λh
thus abstract from this dimension of asymmetry.
Another possibility for that we explore in our applied work combines our approach to

18
conditional forecasts with our algorithm for computing GIRFs. Specifically, we may switch
off specific transmission channels of structural shocks by partially matching the moments
of the predictive distribution conditional on the shock with those of the unconditional
predictive distribution. By construction, this results in a GIRF that is equal to zero for
the restricted dimensions, thereby effectively considering an alternative scenario where
the shock cannot propagate through this channel. From an implementation perspective,
we may manipulate Equation (11) for s = d using a hard restriction as in Equation (9),
(m) (m,∅) (m,d)
such that rh = Rh F (m) (xτ +h ). That is, we impose that Rh λτ,h = 0rh along the
desired rh dimensions.

4. EMPIRICAL APPLICATIONS

We employ the proposed framework in three related yet distinct applications. First, we use
the annual stress test scenarios conducted by the Federal Reserve System and compute
conditional forecasts using soft constraints on several variables. Second, we study the
implications of varying financial conditions (imposing hard constraints over a period) on
tail risks of output growth, inflation, and employment. Third, we identify a US-based
financial shock and gauge the role of spillovers and spillbacks to several other major
economies. Across these applications we mainly compare a homoskedastic (BART-hom,
setting st = 1 for all t) and heteroskedastic BART implementation (BART-het) with a
heteroskedastic BVAR (BVAR-het), both of which feature the outlier specification. Due to
our sample featuring the Covid-19 pandemic observations we disregard the homoskedastic
BVAR version (see Lenza and Primiceri, 2022, for a discussion).

4.1. Stress testing scenarios for the US economy

In our first application, we conduct a scenario analysis for the US economy inspired by
the 2024 version of the Dodd-Frank Act (DFA) stress test assumptions. This annual stress
test is conducted and published by the Board of Governors of the Federal Reserve System.
Details about the underlying dataset are provided in Appendix A. The information set

19
features about 25 broad variables (capturing economic activity, the labor market, prices,
housing and the financial sector). We estimate our models using data on a quarterly
frequency ranging from 1976Q1 to 2023Q4, and subsequently consider a baseline and
adverse scenario for the period from 2024Q1 to 2027Q1. These scenarios are imposed
via soft constraints on the future path of the unemployment rate (UNRATE), CPI inflation
(CPIAUCSL), and 10-year government bond yields (GS10), similar to Chan et al. (2025).
They are visualized in Figure 2.

CPIAUCSL UNRATE GS10


10
4
7.5
8 3
5.0
6 2
2.5
4 1
2021 2022 2023 2024 2025 2026 2027 2021 2022 2023 2024 2025 2026 2027 2021 2022 2023 2024 2025 2026 2027

Scenario Baseline Adverse Data

Figure 2: Restrictions imposed on the future paths of the indicated variables.


Notes: Scenarios according to the 2024 DFA stress test assumptions (solid lines), shaded areas indicate the
bounds of the imposed soft restrictions. Variables: Consumer price inflation (CPIAUCSL), unemployment
rate (UNRATE), and 10-year government bond yields (GS10).

We display the posterior median forecasts alongside 50 and 68 percent posterior


credible sets for selected unrestricted variables in Figure 3: real GDP (GDPC1), indus-
trial production (INDPRO), personal consumption expenditure (PCE) inflation (PCECTPI),
payroll employment (PAYEMS), 1-year government bond yields (GS1) and the Gilchrist
and Zakrajšek (2012) excess bond premium (EBP). The baseline scenario draws from the
consensus projections from 2024 Blue Chip Financial Forecasts and Blue Chip Economic
Indicators. The adverse scenario is characterized by a severe recession. It is noteworthy
that the unconditional forecasts (in grey shades) approximately coincide with the base-
line scenario (blue shades) in most cases. This is unsurprising, given that this scenario
is designed to reflect the expectations of market participants, who apparently predict the
economy to evolve similarly to what the models we consider here predict. Differences
emerge irrespective of the linear vs. nonlinear specification for short-term interest rates,

20
which are predicted to stay at a somewhat higher level unconditionally; and the BVAR
suggests inflation to be elevated when comparing the unconditional forecast to the baseline
scenario.
Turning to the adverse scenario, a different picture emerges — specifically, the sce-
nario forecasts differ significantly from the unconditional forecasts. And there are some
differences arising from nonlinearities in both the conditional means and variances. In-
terestingly, the different model specifications mostly agree about path of PCE inflation,
financial conditions and the short-term interest rate conditional on the adverse scenario.
As expected, financial conditions tighten initially but tend to improve subsequently, par-
tially through a monetary easing response by the central bank as reflected in short-term
interest rates. In addition, the assumed trajectory of the conditioning variables results in
a modestly disinflationary episode that vanishes by 2026.
Major differences across model implementations emerge when considering measures
of economic activity and payroll employment. While all three models agree about the fact
that the adverse scenario leads to a significant economic contraction, the heteroskedastic
BART model suggests somewhat less severe magnitudes of this downturn. This can be
explained by noting that for this specification, the algorithm decides to classify several
observations (that are otherwise informative about directional movements of variables
when assuming homoskedasticity) as noisy or even outliers. We note that BART, due
to the way how tree-based approaches fit data, is capable of dealing with outliers and
heteroskedastic data features in the conditional mean function by design (see Huber et al.,
2023; Clark et al., 2023, for discussions), even when assuming homoskedastic reduced form
errors. But in this case it classifies several observations instead as noise rather than signal.
Comparing the homoskedastic BART-version with the BVAR, which are closer in
terms of conditional predictive distributions for the adverse scenario, both suggest a signif-
icant decline in industrial production, with a trough at −10 percent (about −6 percent for
heteroskedastic BART). Relatedly, the BVAR predicts a decline in real GDP of about −4
percent, roughly in line with the numbers obtained when running homoskedastic BART,
at −5 percent. Where the two differ in this context is in the predicted recovery following

21
(a) BART-hom
GDPC1 INDPRO PCECTPI
10
10
6
5 0
4
0
−10 2
−5
0
2022 2024 2026 2022 2024 2026 2022 2024 2026

PAYEMS GS1 EBP


5
4 0.4
0
2 0.0
−5
0 −0.4
−10
2022 2024 2026 2022 2024 2026 2022 2024 2026

Baseline Adverse Unconditional Data

(b) BART-het
GDPC1 INDPRO PCECTPI
5 6
5.0
2.5 0
4
0.0 −5
2
−2.5
−10
−5.0 0
2022 2024 2026 2022 2024 2026 2022 2024 2026

PAYEMS GS1 EBP


6
3 4 0.5
0 2 0.0
−3 0 −0.5

2022 2024 2026 2022 2024 2026 2022 2024 2026

Baseline Adverse Unconditional Data

(c) BVAR-het
GDPC1 INDPRO PCECTPI
10
4 6
0
0 4

−4 −10 2
0
2022 2024 2026 2022 2024 2026 2022 2024 2026

PAYEMS GS1 EBP


7.5
3 0.4
5.0
0 2.5 0.0
−3 0.0 −0.4
−0.8
2022 2024 2026 2022 2024 2026 2022 2024 2026

Baseline Adverse Unconditional Data

Figure 3: Conditional and unconditional forecasts for selected variables.


Notes: Posterior median alongside 50/68 percent credible sets. Variables: Real GDP (GDPC1), indus-
trial production (INDPRO), personal consumption expenditure inflation (PCECTPI), payroll employment
(PAYEMS), 1-year government bond yields (GS1) and excess bond premium (EBP).

22
the trough, which is more sluggish for the nonparametric model. Turning to payroll em-
ployment, homoskedastic BART suggests a sharper decline of about −6 percent, which is
about twice the size of the decline conditionally forecasted by the heteroskedastic BART
and BVAR models.

4.2. Financial conditions in the US and tail risk scenarios

In this empirical application, we restrict our sample from 1976Q1 to 2017Q4 and consider
the period from 2018Q1 until 2019Q1 as a laboratory to assess nonlinearities in the re-
lationship between economic variables and financial conditions. For this application we
use the homoskedastic BART model as the pandemic observations are excluded from our
dataset. We investigate nonlinear patterns of macroeconomic risk, which, following the
“growth-at-risk” approach of Adrian et al. (2019), is defined as the predictive quantiles
of some variable of interest at a pre-defined probability level (in line with value-at-risk,
VaR, in finance). We pick this period because the information set already contains the
global financial crisis (and the model thus had the opportunity to learn from this se-
vere financial episode), and because this “holdout sample” otherwise coincides with a
comparatively eventless period. We impose hard constraints on the future path of the
National Financial Conditions Index (NFCI) and trace the effects of these scenarios on
several macroeconomic variables. The scenarios are defined to reflect an increase of the
NFCI ranging from approximately 1, 3 and 6 unconditional standard deviations (reflect-
ing tighter financial conditions) in 2018Q1, which we implement by placing these values
as hard restriction on the NFCI in that quarter. From 2018Q2 onward we leave the
respective future path unrestricted.
We investigate growth-at-risk (quantiles of real GDP), inflation-at-risk (quantiles
of PCE inflation) and labor-at-risk (quantiles of growth in payroll employment) as our
objects of interest (see Adams et al., 2021; Botelho et al., 2024; Clark et al., 2024; Lopez-
Salido and Loria, 2024, for related papers). The resulting conditional forecast distributions
(density estimates) are shown in Figure 4. Computing the difference between these condi-

23
tional scenario distributions and the unconditional one yields an estimate of the unorthog-
onalized IRF (UIRF). In the spirit of Equation (10), we have E(yτ +h |I, C1:h )−E(yτ +h |I),
which is the counterfactual difference between the scenario defined by the restrictions in
the Ch ’s and the unconditional forecast. Different to a simulation of an individual struc-
tural shock, the UIRF reflects a likely combination of structural shocks that increases the
NFCI by a predefined amount, see also Crump et al. (2025).

GDPC1 PCECTPI PAYEMS

2019Q1

2018Q4

2018Q3

2018Q2

2018Q1
−30 −20 −10 0 10 −10 0 10 −10 −5 0 5

<0.05 (0.05,0.95) 1 Realized


VaR
>0.95 Max. NFCI 3 Forecast
6

GDPC1 PCECTPI PAYEMS NFCI


5
0 6
0 0
UIRF

−5 −2 4
−4
−10 2
−8 −4
−15
0
1

1
Q

Q
18

18

18

18

19

18

18

18

18

19

18

18

18

18

19

18

18

18

18

19
20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

20

Max. NFCI 1 3 6

Figure 4: Conditional forecast distributions for selected variables and macroeconomic


value-at-risk (VaR) for different scenarios of financial stress.
Notes: The crosses mark the posterior median for unconditional forecasts and circles indicate realized val-
ues. Max. NFCI refers to the maximum value of the NFCI for the scenarios, with moderate (1), severe (3,
comparable to the global financial crisis), and extreme stress (6). Sampling period 1976Q1 to 2017Q4, the
hard restriction applies for 2018Q1. Unorthogonalized impulse response functions (UIRFs) are computed
as the difference between the conditional and unconditional distribution (posterior median alongside 50
and 68 percent credible sets). Variables: Real GDP (GDPC1), personal consumption expenditure inflation
(PCECTPI), payroll employment (PAYEMS), national financial conditions index (NFCI).

24
The different NFCI scenarios for 2018Q1 shift the predictive distributions, especially
during the quarter when this reduced form shock materializes. The resulting dynamic ef-
fects, as measured with the UIRFs, are rather short-lived for real GDP and PCE inflation,
but more persistent for payroll employment. In all shown cases, the economy contracts
which is reflected in a decrease of real GDP growth and payroll employment, and the
simulated shock has a deflationary effect. A clear pattern that emerges is that while the
upper tails of the distributions remain rather stable (upside risk is constant), downside
risk as measured by the lower quantiles increases significantly for all considered variables
(the red shaded VaR < 0.05 moves strongly leftwards), and there are some visible asym-
metries. While the moderate NFCI scenario (max. NFCI = 1) results in growth-at-risk
for the 5th percentile at about −5 percent, the severe (max. NFCI = 3) and extreme
(max. NFCI = 6) stress scenarios yield −10 and −20 percent, respectively. This finding
is also present for inflation-at-risk and labor-at-risk.
The resulting predictive distributions exhibit non-Gaussian features, chief among
them being particularly heavy tails and skewness (see also Clark et al., 2023, for a related
but simplified scenario analysis in this context). In addition, there are hints of multi-
modality as the assumed values for the NFCI in 2018Q1 turn more extreme, which relates
to the discussions in Adrian et al. (2021). For instance, while most mass of the predictive
distribution of payroll employment growth, for the extreme stress scenario, is centered on
about −3 percent, there is a smaller local peak at values of −5 percent. A similar pattern
is visible for PCE inflation.

4.3. Spillovers and spillbacks of US financial shocks

This application estimates the effect of a financial shock in the US and traces its effects
through the domestic economy, but also captures spillovers and spillbacks to and from
several other economies. We use a slightly different dataset in this case, which drops
several of the domestic indicators, but adds bilateral exchange rates with the EA and
Japan alongside real GDP for the EA, Japan and the UK.

25
Following the SVAR literature, we assume that the reduced form shocks are linked
to the structural shocks as follows, ϵt = A−1 −1 −1 ′
0 ut . This implies that Σ = A0 A0 , and

we identify A−1
0 using a set of zero impact restrictions imposed with a Cholesky decom-

position of the form Σ = DD ′ . That is, A−1


0 = D and ∂yτ /∂ujτ = De′j = δ0 and
we orthogonalize the structural shocks (different to the application in Section 4.2 which
dealt with unorthogonalized shocks that resulted in an increase of the NFCI). We simulate
different shock sizes of different signs with d ∈ {−3, −1, 1, 3, 6}. Different to conventional
linear SVAR frameworks, our approach allows to assess nonlinearities of responses with
respect to different signs and magnitudes of a shock with GIRFs. Such asymmetries and
related nonlinearities have recently gained attention both in a VAR and local projection
context, see, e.g., Mumtaz and Piffer (2022); Carriero et al. (2023); Forni et al. (2024);
Hauzenberger et al. (2024a).
To identify the financial shock, we place timing-restrictions on the contemporaneous
impulse responses as described above. This is operationalized with a specific ordering of
the quantities in the vector yt . Specifically, we structure this vector such that all slow
moving domestic and foreign macroeconomic variables come first (which imposes zero
restrictions on impact). These variables are then followed by the excess bond premium
(EBP, Gilchrist and Zakrajšek, 2012), and all fast moving variables such as those capturing
the financial economy. We interpret the orthogonalized innovation of the EBP equation as
the financial shock, similar to Barnichon et al. (2022). In a multicountry context, Huber
et al. (2024) use an identification scheme virtually identical to ours.
We present selected results for key macroeconomic and financial variables in Figure
5, additional empirical results can be found in the Appendix. While our framework allows
to compute GIRFs for each period in our sample, we focus on time averages in the results
that follow. The rows in the figure show different subsets of the same set of results,
structured such that the shocks of different signs and sizes can be compared with ease.
That is, for visualization purposes, we typically rescale the GIRFs to a common range
(m,d)
by computing “normalized” GIRFs, λ̃m,d
τ,h = λτ,h /d. Note that for linear VARs, such

scalings do not make a difference because the responses are symmetric (see the additional

26
GDPC1 CPIAUCSL PAYEMS FEDFUNDS SP500
0.1 0
0.5 0.5
0.0 0.0 −1
0.0 0.0
−0.5 −0.5 −2
−0.5
−1.0 −0.1
−3
−1.0 −1.0
−1.5
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) 1 3 (scaled) 6 (scaled)

GDPC1 CPIAUCSL PAYEMS FEDFUNDS SP500


1.0
1.0 1.0
0.5 0.1 2
0.5 0.5
0.0 0.0 0.0 0.0 0
−0.5 −0.5 −0.5
−0.1 −2
−1.0 −1.0
−1.0
−1.5
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) −1 1 −1 (flipped sign)

GDPC1 CPIAUCSL PAYEMS FEDFUNDS SP500


3
2
1 2 0.2 5
1
0 0 0.0 0
0
−1 −1 −0.2
−2 −5
−2
−2 −0.4
−3 −10
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) −3 3 −3 (flipped sign)

Figure 5: Impulse response functions for selected variables to a financial shock in the
US, comparing asymmetries due to size and sign of the shocks.
Notes: Posterior median alongside 50 and 68 percent credible sets. Cumulated responses for variables
in differences and levels for all other variables. Variables: Real GDP (GDPC1), consumer price inflation
(CPIAUCSL), payroll employment (PAYEMS), federal funds rate (FEDFUNDS) and S&P500 index (SP500).

results for the linear BVAR in the Appendix). For nonlinear models, this is not necessarily
the case and allows for a visual inspection of asymmetries.
Starting with the first row in Figure 5, we find that the size of the financial shock does
not matter much for the GIRFs about any of the indicated variables. Financial shocks of
different sizes rescaled to reflect a 1 standard deviation innovation rather symmetrically
decrease real GDP and payroll employment. Peak effects occur between one and two years
after impact of the shock. In addition, the shock puts a persistent downward pressure

27
on prices and leads to a decline in the Federal funds rate which peaks at about −10
basis points after around a year. Notably it does not react on impact, different to stock
returns which immediately decline by about 1.5 percent during the quarter that the shock
materializes. Qualitatively and in terms of magnitudes, these estimates are roughly in
line with those in Gilchrist and Zakrajšek (2012). We do not report these results here to
save space, but note that the US-based financial shock spills over to the other economies
and leads to contractionary effects in terms of real GDP.
Having established that the size of the financial shock does not seem to matter
much, the second and third row zoom into sign asymmetries. Here, we show the raw
GIRF in grey, while a version of the normalized GIRF flips the sign to ease comparisons.
The 1 standard deviation US-based financial shock does not result in significant sign
asymmetries (the posterior distributions overlap for the most part). Turning to the final
row, this clearly differs for larger sized shocks of different signs. For these GIRFs that
show the responses to a positive and negative 3 standard deviation shock, asymmetries
are striking and significant for most variables. In particular, we find that the negative
effect on payroll employment is almost twice as large for adverse shocks, and the Federal
Reserve responds more strongly to adverse financial shocks, as measure with the much
stronger shift in the Federal funds rate. These findings corroborate the empirical evidence
presented by the preceding literature (see, e.g., Forni et al., 2024; Hauzenberger et al.,
2024a).
We next explore the role of international variables in the domestic transmission of
the US shock. For this purpose, besides unrestricted GIRFs, we consider an alternative
analysis where non-domestic transmission channels are switched off. This is different to
Huber et al. (2024), who focus on international effects of US-based shocks; indeed, we
investigate how international channels affect the domestic transmission of shocks originat-
ing in the US. That is, we impose the restriction that foreign variables do not respond to
the financial shock in the US in this counterfactual, thereby simulating a scenario where
the financial shock is fully confined to the domestic economy without any spillovers (or
spillbacks); see Breitenlechner et al. (2022) for a monetary application in this context.

28
GDPC1 CPIAUCSL PAYEMS FEDFUNDS SP500
2 0.3
2 2 0.2
1 7.5
1 1 0.1
Scenario (SDs)
−3

0 0 5.0
0 0.0
−1 −1 −0.1 2.5
−1 −2 −2 −0.2 0.0
0 0.0
1 0
−1 −2.5
0 −1 0.0
−2 −2 −5.0
3

−1 −3 −0.2
−3 −7.5
−2 −4 −4 −10.0
−3 −5 −0.4
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

GIRF unrestricted no spillovers


(unrestricted − no spillovers)

GDPC1 CPIAUCSL PAYEMS FEDFUNDS SP500


2 4 3 0.3
Difference

2
1 3 2 0.2
0 2 1 0.1 0
0
−1 1 0.0 −2
−1
−2 0 −0.1
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) −3 3

Figure 6: Unrestricted and restricted impulse response functions for selected variables.
Notes: The restricted case assumes that the US financial shock does not spill over to non-domestic
variables. The upper panels show the GIRFs for these two cases, and the lower panel shows the posterior
distribution of the differences between the unrestricted and no-spillovers scenario. Posterior medians
alongside 50 percent credible sets. Cumulated responses for variables in differences and levels for all
other variables.

The results are displayed in Figure 6. The upper panels show the unrestricted GIRFs
(those shown and discussed in the context of Figure 5) and restricted “no spillovers”
GIRFs. The lower panels plot the difference between the two. Two key findings are
worth reporting. First, for the most part, ruling out spillovers and spillbacks does not
significantly alter the GIRFs for most variables. This can be observed from the credible
sets covering the zero line in all but one panel in the bottom row of the figure. Second,
international transmission channels appear to matter for inflation dynamics after financial
shocks. We find that in the no-spillover case, the restricted GIRFs to the shocks of different
signs are clearly asymmetric. The inflation response is insignificant for benign financial
shocks, but significantly negative for adverse shocks; this is different for unrestricted
GIRFs, which are mostly symmetric.
In terms of the importance of international transmission channels for the domestic

29
shock propagation, we find that non-domestic dynamics partially offset disinflationary or
deflationary pressures in response to adverse US financial shocks. By contrast, in the no-
spillover case, the inflation GIRFs take smaller or even negative values for benign financial
shocks than in the unrestricted case. These patterns suggests that propagation through
non-domestic variables overall lowers the inflation responses irrespective of the sign of the
shock. In other words, ruling out international channels loosely speaking introduces a
negative “bias” of the response of US inflation in this counterfactual simulation.

5. CONCLUSIONS

This paper presents a robust and unified methodology for conducting scenario analysis in
multivariate macroeconomic settings, accommodating nonlinearities and unknown func-
tional forms of conditional mean relationships. The proposed methods are applicable not
only in traditional nonlinear frameworks, such as variants of threshold or time-varying
parameter models, but also to more recently developed models incorporating machine
learning techniques. By extending conditional forecasts and GIRFs to a flexible, non-
parametric framework, we address some limitations of traditional linear and parametric
models in generating various types of counterfactual analyses. Specifically, we explore the
application of conditional forecasts in a nonlinear setting by leveraging the properties of
conditionally Gaussian errors. Furthermore, we demonstrate how to derive dynamic causal
effects in the form of GIRFs in a nonlinear context and quantify the contribution of specific
transmission channels in the propagation of structural shocks. This approach is broadly
applicable and computationally efficient, making it suitable for large-scale macroeconomic
datasets.
Empirical applications, focusing on the use of BART as an example of nonparamet-
ric modeling of the conditional mean function, underscore the critical role of nonlinearities
and heteroskedasticity in shaping macroeconomic dynamics. For instance, scenario anal-
ysis based on Federal Reserve stress tests reveals differences between linear and nonlinear
models in forecasting economic contractions and recoveries. Similarly, our growth-at-risk

30
application demonstrates how nonlinearities influence the distribution of macroeconomic
risks under financial stress, particularly in amplifying downside risks. Finally, the anal-
ysis of financial spillovers reveals significant asymmetries in the transmission of shocks
and the influence of international linkages on domestic outcomes. Our results indicate
that incorporating nonlinearities in conditional forecasts and scenario analysis provides a
richer understanding of risk propagation and policy effects. By addressing limitations in
traditional linear approaches and offering a flexible tool for analyzing complex economic
relationships, this paper contributes to the literature on macroeconomic forecasting, risk
assessment, and policy evaluation.

REFERENCES
Adams PA, Adrian T, Boyarchenko N, and Giannone D (2021), “Forecasting
macroeconomic risks,” International Journal of Forecasting 37(3), 1173–1191.
Adrian T, Boyarchenko N, and Giannone D (2019), “Vulnerable growth,” Amer-
ican Economic Review 109(4), 1263–1289.
——— (2021), “Multimodality in macrofinancial dynamics,” International Economic Re-
view 62(2), 861–886.
Antolin-Diaz J, Petrella I, and Rubio-Ramı́rez JF (2021), “Structural scenario
analysis with SVARs,” Journal of Monetary Economics 117, 798–815.
Bańbura M, Giannone D, and Lenza M (2015), “Conditional forecasts and scenario
analysis with vector autoregressions for large cross-sections,” International Journal
of Forecasting 31(3), 739–756.
Barnichon R, Matthes C, and Ziegenbein A (2022), “Are the effects of financial
market disruptions big or small?” Review of Economics and Statistics 104(3), 557–
570.
Botelho V, Foroni C, and Renzetti A (2024), “Labour at risk,” European Eco-
nomic Review 170, 104849.
Botev ZI (2017), “The normal law under linear restrictions: simulation and estimation
via minimax tilting,” Journal of the Royal Statistical Society (Series B) 79(1), 125–
148.
Breitenlechner M, Georgiadis G, and Schumann B (2022), “What goes around
comes around: How large are spillbacks from US monetary policy?” Journal of
Monetary Economics 131, 45–60.
Carriero A, Clark TE, and Marcellino M (2016), “Common drifting volatility in
large Bayesian VARs,” Journal of Business & Economic Statistics 34(3), 375–390.
Carriero A, Clark TE, Marcellino M, and Mertens E (2023), “Shadow-rate
VARs,” Deutsche Bundesbank DP 14/2023.
——— (2024), “Addressing COVID-19 outliers in BVARs with stochastic volatility,” Re-
view of Economics and Statistics 1–15.
Chan JC (2020), “Large Bayesian VARs: A flexible Kronecker error covariance struc-
ture,” Journal of Business & Economic Statistics 38(1), 68–79.

31
——— (2023), “Comparing stochastic volatility specifications for large Bayesian VARs,”
Journal of Econometrics 235(2), 1419–1446.
Chan JC, Pettenuzzo D, Poon A, and Zhu D (2025), “Conditional Forecasts in
Large Bayesian VARs with Multiple Equality and Inequality Constraints,” Journal
of Economic Dynamics and Control 105061.
Chan JC, Poon A, and Zhu D (2023), “High-dimensional conditionally Gaussian state
space models with missing data,” Journal of Econometrics 236(1), 105468.
Chipman HA, George EI, and McCulloch RE (2010), “BART: Bayesian additive
regression trees,” The Annals of Applied Statistics 4(1), 266–298.
Clark TE, Huber F, Koop G, Marcellino M, and Pfarrhofer M (2023),
“Tail forecasting with multivariate Bayesian additive regression trees,” International
Economic Review 64(3), 979–1022.
——— (2024), “Investigating growth-at-risk using a multicountry nonparametric quantile
factor model,” Journal of Business & Economic Statistics 42(4), 1302–1317.
Cong Y, Chen B, and Zhou M (2017), “Fast simulation of hyperplane-truncated
multivariate normal distributions,” Bayesian Analysis 12(4), 1017–1037.
Crump RK, Eusepi S, Giannone D, Qian E, and Sbordone AM (2025), “A large
Bayesian VAR of the United States economy,” International Journal of Central
Banking forthcoming.
Doan T, Litterman R, and Sims C (1984), “Forecasting and conditional projection
using realistic prior distributions,” Econometric reviews 3(1), 1–100.
Esser J, Maia M, Parnell AC, Bosmans J, van Dongen H, Klausch T, and
Murphy K (2024), “Seemingly unrelated Bayesian additive regression trees for
cost-effectiveness analyses in healthcare,” arXiv 2404.02228.
Fischer MM, Hauzenberger N, Huber F, and Pfarrhofer M (2023), “General
Bayesian time-varying parameter vector autoregressions for modeling government
bond yields,” Journal of Applied Econometrics 38(1), 69–87.
Forni M, Gambetti L, Maffei-Faccioli N, and Sala L (2024), “Nonlinear trans-
mission of financial shocks: Some new evidence,” Journal of Money, Credit and
Banking 56(1), 5–33.
Gilchrist S, and Zakrajšek E (2012), “Credit spreads and business cycle fluctua-
tions,” American Economic Review 102(4), 1692–1720.
Goulet Coulombe P (2024), “To bag is to prune,” Studies in Nonlinear Dynamics &
Econometrics forthcoming.
Goulet Coulombe P, Leroux M, Stevanovic D, and Surprenant S (2022),
“How is machine learning useful for macroeconomic forecasting?” Journal of Applied
Econometrics 37(5), 920–964.
Hauzenberger N, Huber F, Klieber K, and Marcellino M (2024a), “Machine
Learning the Macroeconomic Effects of Financial Shocks,” arXiv 2412.07649.
Hauzenberger N, Huber F, and Koop G (2024b), “Macroeconomic forecasting us-
ing BVARs,” in MP Clements, and AB Galvão (eds.) “Handbook of Research
Methods and Applications in Macroeconomic Forecasting,” chapter 2, 15–42, Chel-
tenham, UK/Northampton, USA: Edward Elgar Publishing.
Hauzenberger N, Huber F, Marcellino M, and Petz N (2024c), “Gaussian
process vector autoregressions and macroeconomic uncertainty,” Journal of Business
& Economic Statistics 1–17.
Huang A, and Wand MP (2013), “Simple marginally noninformative prior distribu-

32
tions for covariance matrices,” Bayesian Analysis 8(2), 439–452.
Huber F, Klieber K, Marcellino MG, Onorante L, and Pfarrhofer M
(2024), “Asymmetries in International Financial Spillovers,” SSRN 5054831.
Huber F, Koop G, Onorante L, Pfarrhofer M, and Schreiner J (2023), “Now-
casting in a pandemic using non-parametric mixed frequency VARs,” Journal of
Econometrics 232(1), 52–69.
Huber F, and Rossini L (2022), “Inference in Bayesian additive vector autoregressive
tree models,” The Annals of Applied Statistics 16(1), 104–123.
Jarociński M (2010), “Conditional forecasts and uncertainty about forecast revisions
in vector autoregressions,” Economics Letters 108(3), 257–259.
Koop G, Pesaran MH, and Potter SM (1996), “Impulse response analysis in non-
linear multivariate models,” Journal of Econometrics 74(1), 119–147.
Lenza M, and Primiceri GE (2022), “How to estimate a vector autoregression after
March 2020,” Journal of Applied Econometrics 37(4), 688–699.
Lopez-Salido D, and Loria F (2024), “Inflation at risk,” Journal of Monetary Eco-
nomics 103570.
Marcellino M, and Pfarrhofer M (2024), “Bayesian nonparametric methods for
macroeconomic forecasting,” in MP Clements, and AB Galvão (eds.) “Hand-
book of Research Methods and Applications in Macroeconomic Forecasting,” chap-
ter 5, 90–125, Cheltenham, UK/Northampton, USA: Edward Elgar Publishing.
Medeiros MC, Vasconcelos GF, Veiga Á, and Zilberman E (2021), “Forecasting
inflation in a data-rich environment: the benefits of machine learning methods,”
Journal of Business & Economic Statistics 39(1), 98–119.
Mumtaz H, and Piffer M (2022), “Impulse response estimation via flexible local
projections,” arXiv 2204.13150.
Waggoner DF, and Zha T (1999), “Conditional forecasts in dynamic multivariate
models,” Review of Economics and Statistics 81(4), 639–651.

33
Online Appendix: Scenario analysis with
multivariate Bayesian machine learning models

A. DATA

Table A.1: Dataset. Notes: Variable codes, descriptions and transformation: (0) no
transformation h(xt ) = xt ; (1) annualized log-differences h(xt ) = 400·log(xt /xt−1 ); (2) log-
differences h(xt ) = 100 · log(xt /xt−1 ). Check marks indicate inclusion in the information
sets for our applications (CF for Sections 4.1 and 4.2, GIRF for Section 4.3).

Code Description h(xt ) CF GIRF


GDPC1 Real gross domestic product 1 ✓ ✓
PCECC96 Real personal consumption expenditure 1 ✓
PRFIx Real private fixed investment (residential) 1 ✓
GCEC1 Real Government consumption and investment 1 ✓
RDI Real disposable income 0 ✓
INDPRO Industrial production 1 ✓
CPIAUCSL Headline consumer price index (CPI) 1 ✓ ✓
CPILFESL Core CPI (excl. food and energy) 1 ✓
PCECTPI Headline PCE prices 1 ✓
PCEPILFE Core PCE prices (excl. food and energy) 1 ✓
HPI House price index 1 ✓ ✓
HOUST Housing starts 1 ✓
MR Mortgage rate 0 ✓
PAYEMS Payroll employment 1 ✓ ✓
UNRATE Unemployment rate 0 ✓
FEDFUNDS Federal funds rate 0 ✓ ✓
GS1 1-year treasury rate 0 ✓ ✓
GS10 10-year treasury rate 0 ✓ ✓
EBP Excess bond premium 0 ✓ ✓
NFCI National financial conditions index 0 ✓
EXUSUKx US/UK foreign exchange rate 0 ✓ ✓
OILPRICEx Real crude oil prices (WTI) 2 ✓ ✓
SP500 S&P 500 2 ✓ ✓
EARGDP Real gross domestic product (EA) 0 ✓
JPRGDP Real gross domestic product (JP) 0 ✓
UKRGDP Real gross domestic product (UK) 0 ✓
USDEUR EU/US foreign exchange rate 0 ✓
JPUSD JP/US foreign exchange rate 0 ✓

1
B. ADDITIONAL EMPIRICAL RESULTS

(a) BART-het
GDPC1 CPIAUCSL PAYEMS EBP FEDFUNDS SP500
2 0.50
1 2 1.0
0.25
0 0 0
0 0.5 0.00
−1 −2
−2 0.0 −0.25 −10
−2 −4 −0.50
−3 −0.5
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) −3 −1 1 3 6

GDPC1 CPIAUCSL PAYEMS EBP FEDFUNDS SP500


0.20 0.1 0
0.5 0.5
0.0 0.0 0.15 −1
0.0 0.0
−0.5 −0.5 0.10 −2
−0.5 0.05
−1.0 −1.0 −0.1 −3
−1.0 0.00
−1.5
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (normalized) −1 −3 1 3 6

(b) BVAR-het
GDPC1 CPIAUCSL PAYEMS EBP FEDFUNDS SP500
1 2 2.5 0.5
1.0
0 0 0.0 0.0 0
0.5
−1 −2 −2.5 −0.5
0.0 −10
−2 −5.0
−4 −0.5 −1.0
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (SDs) −3 −1 1 3 6

GDPC1 CPIAUCSL PAYEMS EBP FEDFUNDS SP500


0.2 0.0 0
0.25 0.20
0.0 0.00 −0.3 0.15 0.0 −1
−0.2 −0.25 −0.6 0.10
−0.1 −2
−0.50 −0.9 0.05
−0.4 0.00 −3
−1.2
0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20 0 4 8 12 16 20
Horizon (quarters)

Scenario (normalized) −1 −3 1 3 6

Figure B.1: Comparison of impulse response functions across nonlinear and linear mod-
els. Posterior medians alongside 68 percent credible sets. Cumulated responses for vari-
ables in differences and levels for all other variables.

You might also like