code: def setUp(self):
      self.mean_reversion = 0.03
      self.volatility = 0.01
      self.volatility_low = [0.002]
      self.volatility_high = [0.05]
      self.volatility_time_dep = [0.01, 0.015]
  
      self.expiries = np.array(
          [
              0.5,
              0.5,
              1.0,
              1.0,
              2.0,
              2.0,
              3.0,
              3.0,
              4.0,
              4.0,
              5.0,
              5.0,
              10.0,
              10.0,
          ]
      )
      self.float_leg_start_times = np.array(
          [
              [
                  0.5,
                  1.0,
                  1.5,
                  2.0,
                  2.5,
                  2.5,
                  2.5,
                  2.5,
                  2.5,
                  2.5,
              ],  # 6M x 2Y
              [
                  0.5,
                  1.0,
                  1.5,
                  2.0,
                  2.5,
                  3.0,
                  3.5,
                  4.0,
                  4.5,
                  5.0,
              ],  # 6M x 5Y
              [
                  1.0,
                  1.5,
                  2.0,
                  2.5,
                  3.0,
                  3.0,
                  3.0,
                  3.0,
                  3.0,
                  3.0,
              ],  # 1Y x 2Y
              [
                  1.0,
                  1.5,
                  2.0,
                  2.5,
                  3.0,
                  3.5,
                  4.0,
                  4.5,
                  5.0,
                  5.5,
              ],  # 1Y x 5Y
              [
                  2.0,
                  2.5,
                  3.0,
                  3.5,
                  4.0,
                  4.0,
                  4.0,
                  4.0,
                  4.0,
                  4.0,
              ],  # 2Y x 2Y
              [
                  2.0,
                  2.5,
                  3.0,
                  3.5,
                  4.0,
                  4.5,
                  5.0,
                  5.5,
                  6.0,
                  6.5,
              ],  # 2Y x 5Y
              [
                  3.0,
                  3.5,
                  4.0,
                  4.5,
                  5.0,
                  5.0,
                  5.0,
                  5.0,
                  5.0,
                  5.0,
              ],  # 3Y x 2Y
              [
                  3.0,
                  3.5,
                  4.0,
                  4.5,
                  5.0,
                  5.5,
                  6.0,
                  6.5,
                  7.0,
                  7.5,
              ],  # 3Y x 5Y
              [
                  4.0,
                  4.5,
                  5.0,
                  5.5,
                  6.0,
                  6.0,
                  6.0,
                  6.0,
                  6.0,
                  6.0,
              ],  # 4Y x 2Y
              [
                  4.0,
                  4.5,
                  5.0,
                  5.5,
                  6.0,
                  6.5,
                  7.0,
                  7.5,
                  8.0,
                  8.5,
              ],  # 4Y x 5Y
              [
                  5.0,
                  5.5,
                  6.0,
                  6.5,
                  7.0,
                  7.0,
                  7.0,
                  7.0,
                  7.0,
                  7.0,
              ],  # 5Y x 2Y
              [
                  5.0,
                  5.5,
                  6.0,
                  6.5,
                  7.0,
                  7.5,
                  8.0,
                  8.5,
                  9.0,
                  9.5,
              ],  # 5Y x 5Y
              [
                  10.0,
                  10.5,
                  11.0,
                  11.5,
                  12.0,
                  12.0,
                  12.0,
                  12.0,
                  12.0,
                  12.0,
              ],  # 10Y x 2Y
              [
                  10.0,
                  10.5,
                  11.0,
                  11.5,
                  12.0,
                  12.5,
                  13.0,
                  13.5,
                  14.0,
                  14.5,
              ],  # 10Y x 5Y
          ]
      )
      self.float_leg_end_times = self.float_leg_start_times + 0.5
      max_maturities = np.array(
          [
              2.5,
              5.5,
              3.0,
              6.0,
              4.0,
              7.0,
              5.0,
              8.0,
              6.0,
              9.0,
              7.0,
              10.0,
              12.0,
              15.0,
          ]
      )
      for i in range(self.float_leg_end_times.shape[0]):
          self.float_leg_end_times[i] = np.clip(
              self.float_leg_end_times[i], 0.0, max_maturities[i]
          )
  
      self.fixed_leg_payment_times = self.float_leg_end_times
      self.float_leg_daycount_fractions = (
          self.float_leg_end_times - self.float_leg_start_times
      )
      self.fixed_leg_daycount_fractions = (
          self.float_leg_daycount_fractions
      )
      self.fixed_leg_coupon = 0.01 * np.ones_like(
          self.fixed_leg_payment_times
      )
  
      super(HullWhiteCalibrationSwaptionTest, self).setUp()
  
file_path: tf-quant-finance/tf_quant_finance/models/hull_white/calibration_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the HullWhiteCalibrationSwaptionTest obj's underlying member method code with example usage: obj.setUp() without return types