code: def test_figarch_performance(self):
      midas_setup = """
  p = q = 1
  trunc_lag = 1000
  parameters = np.array([1.0, 0.2, 0.2, 0.04])
  fresids = resids ** 2.0
  """
  
      midas_first = """
  recpy.figarch_recursion(parameters, fresids, sigma2, p, q,
                          nobs, trunc_lag, backcast, var_bounds)
  """
      midas_second = """
  rec.figarch_recursion(parameters, fresids, sigma2, p, q,
                        nobs, trunc_lag, backcast, var_bounds)
  """
      timer = Timer(
          midas_first,
          "Numba",
          midas_second,
          "Cython",
          "FIGARCH",
          self.timer_setup + midas_setup,
      )
      timer.display()
      assert timer.ratio < 10.0
      if not (MISSING_NUMBA or CYTHON_COVERAGE):
          assert 0.1 < timer.ratio
  
imports: import os
  import pickle
  import timeit
  import types
  import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose, assert_almost_equal
  import pytest
  from scipy.special import gamma
  import arch.univariate.recursions_python
  from arch.univariate.volatility import RiskMetrics2006
label_desc: Use image node_id 23 for calling the TestRecursions obj's underlying member method code with example usage: obj.test_figarch_performance() without return types