BacktestResult._summary_table#

BacktestResult._summary_table()[source]#

Build the structured summary: one row per horizon and series.

RMSE, MAE, and, when draws were recorded, mean CRPS per cell, under a header with the counts and the scheme; the notes describe the scheme, restate the alignment rule, and say which tools the record can feed.

Return type:

SummaryTable

Returns:

The SummaryTable that summary(), str(), and the notebook renderer display.

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=2, start=100).run()
>>> table = record._summary_table()
>>> table.columns, len(table.rows), table.rows[0][:2]
(('h', 'series', 'RMSE', 'MAE', 'mean CRPS'), 4, ('1', 'y1'))