'calculates forcast for horiz number of periods at end of sample
Parameters
horiz : int (optional, default=1)
forecast horizon
u : array (horiz, nvars)
error term for forecast periods. If None, then u is zero.
Returns
yforecast : array (nobs+horiz, nvars)
this includes the sample and the forecasts'

def forecast(self, horiz=1, u=None):

    if (u is None):
        u = np.zeros((horiz, self.nvars))
    return vargenerate(self.arhat, u, initvalues=self.y)
