'Cumulative sum of squares of standardized recursive residuals
statistics
Returns
cusum_squares : array_like
An array of length `nobs - k_exog` holding the
CUSUM of squares statistics.
Notes
The CUSUM of squares statistic takes the form:
.. math::
s_t = \left ( \sum_{j=k+1}^t w_j^2 \right ) \Bigg /
\left ( \sum_{j=k+1}^T w_j^2 \right )
where :math:`w_j` is the recursive residual at time :math:`j`.
Excludes the first `k_exog` datapoints.
References
.. [1] Brown, R. L., J. Durbin, and J. M. Evans. 1975.
"Techniques for Testing the Constancy of
Regression Relationships over Time."
Journal of the Royal Statistical Society.
Series B (Methodological) 37 (2): 149-92.'

@cache_readonly
def cusum_squares(self):

    numer = np.cumsum((self.resid_recursive[self.loglikelihood_burn:] ** 2))
    denom = numer[(-1)]
    return (numer / denom)
