BEKK estimation¶
Estimation is performed using Quasi Maximum Likelihood (QML) method. Specifically, the individual contribution to the Gaussian log-likelihood is
-
class
bekk.bekk_estimation.
BEKK
(innov)[source]¶ BEKK estimation class.
Attributes
innov Return innovations hvar Condiational variance Methods
estimate
([param_start, restriction, cfree, …])Estimate parameters of the BEKK model. collect_losses
([param_start, innov_all, …])Collect forecast losses using rolling window. -
static
collect_losses
(param_start=None, innov_all=None, window=1000, model='standard', use_target=False, groups=('NA', 'NA'), restriction='scalar', cfree=False, method='SLSQP', use_penalty=False, ngrid=5, alpha=0.05, kind='equal', tname='losses', path=None)[source]¶ Collect forecast losses using rolling window.
Parameters: param_start : ParamStandard or ParamSpatial instance
Initial parameters for estimation
innov_all: (nobs, nstocks) array
Inovations
window : int
Window length for in-sample estimation
model : str
Specific model to estimate.
- Must be
- ‘standard’
- ‘spatial’
restriction : str
Restriction on parameters.
- Must be
- ‘full’ = ‘diagonal’
- ‘group’ (for ‘spatial’ model only)
- ‘scalar’
groups : tuple
First item is the string code. Second is spatial groups specification.
use_target : bool
Whether to use variance targeting (True) or not (False)
cfree : bool
Whether to leave C matrix free (True) or not (False)
ngrid : int
Number of starting values in one dimension
use_penalty : bool
Whether to include penalty term in the likelihood
alpha : float
Risk level. Usually 1% or 5%.
kind : str
Portfolio weighting scheme. Either ‘equal’ or ‘minvar’ (minimum variance).
tname : str
Name to be used while writing data to the disk
Returns: float
Average loss_frob function
-
estimate
(param_start=None, restriction='scalar', cfree=False, use_target=False, model='standard', groups=None, method='SLSQP', cython=True, use_penalty=False)[source]¶ Estimate parameters of the BEKK model.
Parameters: param_start : ParamStandard or ParamSpatial instance
Starting parameters. See Notes for more details.
model : str
Specific model to estimate.
- Must be
- ‘standard’
- ‘spatial’
restriction : str
Restriction on parameters.
- Must be
- ‘full’
- ‘diagonal’
- ‘group’ (only applicable with ‘spatial’ model)
- ‘scalar’
use_target : bool
Whether to use variance targeting (True) or not (False)
cfree : bool
Whether to leave C matrix free (True) or not (False)
groups : list of lists of tuples
Encoded groups of items
method : str
Optimization method. See scipy.optimize.minimize
cython : bool
Whether to use Cython optimizations (True) or not (False)
use_penalty : bool
Whether to include penalty term in the likelihood
Returns: BEKKResults instance
Estimation results object
Notes
If no param_start is given, the program will estimate parameters in the order ‘from simple to more complicated’ (from scalar to diagonal to full) while always using variance targeting.
-
static