*! version 1.0.1 21aug2026

Title

gvar spillover -- Diebold-Yilmaz connectedness

Syntax

gvar spillover [, options]

options

step(#) horizon. Default 24.

by(string) unit, variable or none. Default unit.

type(string) girf, oirf or sgirf.

top(#) how many blocks to list at each end. Default 12.

full also print the pairwise table, if it fits.

first(units) which units lead the ordering. For type(sgirf) this is the identifying assumption, and the block size is derived from it.

vorder(spec) the variable order inside each leading unit, one block per unit separated by ;.

vcov(string) sample keeps the estimated covariance; blockdiag zeroes every cross-unit covariance; blockdiag unit does the same but leaves one unit's cross-covariances free.

shrink shrink the correlation matrix towards the identity, intensity chosen internally.

lambda(#) set the shrinkage intensity by hand, between 0 and 1.

graph net-transmitter bar chart.

name(name) graph name.

nosummary suppress the tables.

saving(name) save the block table.

Description

gvar spillover builds the Diebold-Yilmaz connectedness table from the
variance decomposition at a chosen horizon: how much of each block's forecast
error variance comes from the others, how much it sends, and the net
difference.

A 136 by 136 table is unreadable, so the result is aggregated into blocks -
by unit, which is what the empirical literature reports, or by variable.

Options

step(#) the horizon at which connectedness is measured. Default 24.
Diebold-Yilmaz shares are horizon-dependent and the choice is substantive, not
cosmetic: short horizons load on contemporaneous transmission, long ones on the
accumulated dynamics.

type(girf|oirf|sgirf) the identification underlying the variance shares.

The generalized version is the usual choice and is what Diebold and Yilmaz
themselves use, but note its FEVD columns do not sum to one, so the shares are
row-normalised before the table is formed. That normalisation is part of the
method, not a repair.

by(spec) aggregates the table by group -- region, income class -- instead
of reporting all K x K pairs, and top(#) lists only the largest
transmitters and receivers. Default 12.

full prints the whole matrix rather than the summary, which is what you
want when feeding it to something else.

first(units), vorder(spec), vcov(spec), shrink and
lambda(#) as in gvar irf.

rolling(#) and every(#) compute the index over rolling windows of
# observations, every # periods, which is how the time-varying
connectedness plots in that literature are produced. A window shorter than the
model needs will produce numbers that mean nothing; the command reports how many
windows were explosive rather than averaging them in silently.

network draws a directed network diagram instead of the table, and
threshold(#) suppresses edges below a share, without which the diagram is
a solid block of arrows.

graph, name(), saving() and nosummary as elsewhere.

Remarks

How the aggregation works. The rows are normalised to 100 first and then
summed within blocks, which is the convention in Diebold and Yilmaz (2014) and
in BGVAR. Rows of the block table are averaged over the members of the
receiving block, so a row still sums to 100 rather than to 100 times its size.

The total connectedness index is the average share of forecast error
variance that comes from other blocks. Higher means a more interconnected
system. It depends on the horizon and on the aggregation, so quote both.

NET is the number to read. A positive net value marks a block that
exports more variance than it imports - a transmitter. The ranking is by net,
largest transmitters first.

Examples

. gvar spillover, step(24) by(unit)
. gvar spillover, step(24) by(variable) full
. gvar spillover, step(12) by(unit) graph

Stored results

gvar spillover stores the following in r():

r(spillover) the block table

r(from) variance imported

r(to) variance exported

r(net) to minus from

r(tci) total connectedness index

r(step) the horizon

r(by) the aggregation used

Source

Built from fevd.m; connectedness follows BGVAR conn and Diebold and
Yilmaz (2009, 2014).

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane