FunctionalCoefficientVARResult.forecast#

FunctionalCoefficientVARResult.forecast()[source]#

The one-step-ahead conditional mean.

One step because that is what the observed state licenses: with delay d >= 1 the state that governs period T + 1 is already observed at T, so the forecast is an evaluation, not a simulation. Further steps would need the state’s own future, which is the nonlinear simulation problem this result does not fake.

Return type:

NDArray[double]

Returns:

A (k,) array.

Raises:

SpecificationError – If the next period’s state lies outside the estimated range.

Example

The forecast is the last design row times the coefficient matrix at the last observed state:

>>> import numpy as np
>>> y = np.random.default_rng(0).standard_normal((150, 2))
>>> res = FunctionalCoefficientVAR(y, order=1, transition_variable="y1").fit(
...     bandwidth=1.0, n_grid=11
... )
>>> point = res.forecast()
>>> point.shape
(2,)
>>> row = np.concatenate([[1.0], y[-1]])
>>> bool(np.allclose(point, row @ res._matrix_at(float(y[-1, 0]))))
True