code: def test_tarch_111_forecast(self):
      t = self.t
      vol = GARCH(p=1, o=1, q=1, power=1.0)
      params = np.array([3.0, 0.1, 0.1, 0.80])
      backcast = vol.backcast(self.resid)
      var_bounds = vol.variance_bounds(self.resid, power=1.0)
  
      forecast = vol.forecast(
          params, self.resid, backcast, var_bounds, horizon=1, start=0
      )
      sigma = np.zeros((t + 1, 1))
      sigma[0] = (
          params[0]
          + (params[1] + 0.5 * params[2] + params[3]) * backcast
      )
  
      resid = self.resid
      abs_resid = np.abs(resid)
      sresid = resid < 0
      for i in range(1, t + 1):
          sigma[i] = params[0]
          sigma[i] += params[1] * abs_resid[i - 1]
          sigma[i] += params[2] * abs_resid[i - 1] * sresid[i - 1]
          sigma[i] += params[3] * sigma[i - 1]
  
      expected = sigma[1:] ** 2.0
      assert_allclose(forecast.forecasts, expected)
      assert forecast.forecast_paths is None
      assert forecast.shocks is None
  
      with pytest.raises(ValueError):
          vol.forecast(
              params,
              self.resid,
              backcast,
              var_bounds,
              horizon=10,
              start=0,
          )
  
imports: import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from arch.univariate import arch_model
  from arch.univariate.distribution import Normal, StudentsT
  from arch.univariate.mean import ConstantMean
  from arch.univariate.volatility import APARCH, EGARCH, FIGARCH, GARCH, HARCH, BootstrapRng, ConstantVariance, EWMAVariance, FixedVariance, MIDASHyperbolic, RiskMetrics2006
label_desc: Use image node_id 13 for calling the TestVarianceForecasts obj's underlying member method code with example usage: obj.test_tarch_111_forecast() without return types