docstr: Tests volatility stays close to its mean for small vol of vol.
docstr_tok: ["Tests","volatility","stays","close","to","its","mean","for","small","vol","of","vol","."]
code: def test_volatility(self):
      """Tests volatility stays close to its mean for small vol of vol."""
      theta = 0.05
      process = HestonModel(
          mean_reversion=1.0,
          theta=theta,
          volvol=0.00001,
          rho=-0.0,
          dtype=np.float64,
      )
      years = 1.0
      times = np.linspace(0.0, years, int(365 * years))
      num_samples = 2
      paths = process.sample_paths(
          times,
          time_step=0.01,
          num_samples=num_samples,
          initial_state=np.array([np.log(100), 0.045]),
          seed=None,
      )
      # For small values of volvol, volatility should stay close to theta
      volatility_trace = self.evaluate(paths)[..., 1]
      max_deviation = np.max(abs(volatility_trace[:, 50:] - theta))
      self.assertAlmostEqual(max_deviation, 0.0, places=2)
  
file_path: tf-quant-finance/tf_quant_finance/models/heston/heston_model_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the HestonModelTest obj's underlying member method code with example usage: obj.test_volatility() without return types