BacktestResult.errors#
- property BacktestResult.errors: NDArray[float64][source]#
(T, H, k)forecast errorspoint - realized.The sign convention is forecast minus outcome, so a positive error is an over-forecast. Recomputed on each access from the two stored arrays.
Example
>>> import numpy as np >>> from cultivars.multivariate.reduced_form.vector_autoregression import VAR >>> y = np.random.default_rng(0).standard_normal((130, 2)) >>> record = Backtest(y, lambda w: VAR(w, order=1).fit(), horizons=3, start=100).run() >>> record.errors.shape (28, 3, 2) >>> bool(np.allclose(record.errors, record.point - record.realized)) True