docstr: Tests the basic calculation of log realized volatility.
docstr_tok: ["Tests","the","basic","calculation","of","log","realized","volatility","."]
code: def test_log_vol_calculation(self):
      """Tests the basic calculation of log realized volatility."""
      dtype = tf.float64
      num_series = 200
      num_times = 100
      seed = (1, 2)
      draws = tf.random.stateless_normal(
          (num_series, num_times), seed=seed, dtype=dtype
      )
      sample_paths = tf.math.exp(tf.math.cumsum(draws, axis=-1))
      volatilities = tff.models.realized_volatility(sample_paths)
      expected_volatilities = tf.math.sqrt(
          tf.math.reduce_sum(draws[:, 1:] ** 2, axis=1)
      )
      self.assertAllClose(volatilities, expected_volatilities, 1e-6)
  
file_path: tf-quant-finance/tf_quant_finance/models/realized_volatility_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 RealizedVolatilityTest obj's underlying member method code with example usage: obj.test_log_vol_calculation() without return types