cultivars.multivariate.nonlinear.smooth_transition#

The smooth-transition vector autoregression: regimes as a dial, not a switch.

An STVAR replaces the threshold VAR’s indicator with a transition function taking values in \([0, 1]\),

\[y_t = (1 - G(z_t))\,\bigl(c_L + \textstyle\sum_{i=1}^{p} A_{L,i}\, y_{t-i}\bigr) + G(z_t)\,\bigl(c_U + \textstyle\sum_{i=1}^{p} A_{U,i}\, y_{t-i}\bigr) + u_t,\]

so that at every date the system is a convex blend of two regimes, with the blend weight read off an observable \(z_t = s_{t-d}\). The canonical modern use is Auerbach and Gorodnichenko’s fiscal multipliers, where the weight is a smoothed output-growth measure and the finding is that government spending works differently in recessions than in expansions – a statement the smooth form can make with dates that are seventy percent recession, which no hard split can represent. One class carries both transition shapes, because the multivariate literature names the model STVAR whichever \(G\) it uses:

\[G(z) = \bigl(1 + e^{-\gamma (z - c)/\sigma_z}\bigr)^{-1} \quad\text{(logistic)}, \qquad G(z) = 1 - e^{-\gamma (z - c)^2/\sigma_z^2} \quad\text{(exponential)}.\]

The logistic weight is monotone in the transition variable, so the regimes are directional states – recession versus expansion – and the exponential weight is symmetric about the threshold, so both tails share a regime and the middle is the other. (The univariate family splits these into LSTAR and ESTAR because those are established names; LSTVAR and ESTVAR are not.) The speed \(\gamma\) is stated per standard deviation of \(z\) so that one value means the same thing on any series.

Two commitments shape the surface. First, estimation concentrates: conditional on \((\gamma, c)\) the model is linear, so the regime coefficients come from one weighted multivariate least-squares solve and only the pair is searched, derivative-free and multi-start – from the best hard split and from the median, at four initial speeds – on the log-determinant of the residual covariance. The innovation covariance is common across regimes, and the fit record says why: smooth weights never partition the sample, so a per-regime covariance has no subsample to be estimated from. Second, the weak identification of the transition is reported rather than hidden. The likelihood is nearly flat in \(\gamma\) once the weight is effectively an indicator, so a very large fitted speed is a lower bound and STVARResult.is_effectively_abrupt says when the smooth model has collapsed onto a threshold VAR with two spare parameters; and because \((\gamma, c)\) are not identified under linearity (Davies), the chi-squared linearity test is refused and information criteria rank specifications without testing for nonlinearity. Everything the threshold module says about propagation carries over: irf, fevd and ma_representation are regime-conditional, holding one regime frozen.

Layout. STVAR validates on _SmoothTransitionVectorAutoRegressionModel in _internals, which takes the named-or-external transition variable, its delay and the aligned design from _ObservedRegimeVectorModel, adds the transition family, and builds a _VectorSmoothTransitionObjective from _internals._objectives seeded by a grid of hard splits; _fit_regimes runs it through _solve from _internals._solvers, reads the concentrated coefficients and residuals at the optimum, and packs a _VectorSmoothTransitionFit. STVARResult extends _VectorObservedRegimeResult – the two coefficient stacks, the regime-conditional propagation surface, the forecast, regime-wise stability and comparison by information criteria – supplying the weight function and the single covariance the smooth form admits. The abrupt member of the family is threshold; the nonparametric check on the transition’s shape is functional_coefficient; the univariate models are smooth_transition.

References

Auerbach, A. J., & Gorodnichenko, Y. (2012). Measuring the output responses to fiscal policy. American Economic Journal: Economic Policy, 4(2), 1-27.

Terasvirta, T., & Yang, Y. (2014). Specification, estimation and evaluation of vector smooth transition autoregressive models with applications. CREATES Research Paper 2014-08.

Granger, C. W. J., & Terasvirta, T. (1993). Modelling Nonlinear Economic Relationships. Oxford University Press.

Davies, R. B. (1987). Hypothesis testing when a nuisance parameter is present only under the alternative. Biometrika, 74(1), 33-43.

Example

A system whose dynamics slide from a persistent regime to a mean-reverting one as y1 rises: the smooth fit recovers the two regimes and a moderate speed, the weight path is a dial rather than a switch, and the regime-conditional responses differ in sign:

>>> import numpy as np
>>> rng = np.random.default_rng(1)
>>> y = np.zeros((400, 2))
>>> for t in range(1, 400):
...     g = 1.0 / (1.0 + np.exp(-2.0 * y[t - 1, 0]))
...     y[t] = ((1.0 - g) * 0.6 - g * 0.3) * y[t - 1] + rng.standard_normal(2)
>>> res = STVAR(y, order=1, transition_variable="y1").fit()
>>> res.is_effectively_abrupt, bool(1.0 < res.gamma < 3.0)
(False, True)
>>> weight = res.regime_weight
>>> bool(np.mean((weight > 0.1) & (weight < 0.9)) > 0.4)
True
>>> lower = res.irf(2, regime="lower", orthogonalized=False)[1, 0, 0]
>>> upper = res.irf(2, regime="upper", orthogonalized=False)[1, 0, 0]
>>> bool(lower > 0.4), bool(upper < 0.0)
(True, True)
>>> "STVAR(1, logistic, d=1) Results" in str(res.summary())
True

Classes#

STVAR

Smooth-transition vector autoregression, in the Auerbach-Gorodnichenko mould.

STVARResult

A fitted smooth-transition vector autoregression.