code: def test_calibration_correctness_bulk(self):
      np.random.seed(321)
      batch_size = 7
      num_strikes = 30
      forwards = 4.0 + 5.0 * np.random.random(size=batch_size)
      expiries = 0.5 + np.ones_like(forwards)
      log_moneyness = np.random.normal(size=(batch_size, num_strikes))
      strikes = forwards[:, np.newaxis] * np.exp(log_moneyness)
  
      svi_a = 0.1 + 0.3 * np.random.random(size=batch_size)
      svi_b = 0.3 * np.random.random(size=batch_size)
      svi_rho = np.random.random(size=batch_size) - 0.5
      svi_m = 0.5 * np.random.normal(size=batch_size)
      svi_sigma = 0.1 + 0.5 * np.random.random(size=batch_size)
      true_parameters = np.transpose(
          [svi_a, svi_b, svi_rho, svi_m, svi_sigma]
      )
  
      target_volatilities = tff.experimental.svi.implied_volatility_from_raw_svi_parameters(
          svi_parameters=true_parameters,
          log_moneyness=log_moneyness,
          expiries=expiries,
      )
  
      (model_parameters, converged, _) = self.evaluate(
          tff.experimental.svi.calibration(
              forwards=forwards,
              expiries=expiries,
              strikes=strikes,
              volatilities=target_volatilities,
              optimizer_fn=tfp.optimizer.bfgs_minimize,
          )
      )
  
      # Assert model convergence to expected parameters.
      self.assertTrue(converged.all())
      self.assertAllClose(
          model_parameters, true_parameters, atol=1e-3, rtol=1e-2
      )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/svi/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 2 for calling the SimulatedDataCalibrationTest obj's underlying member method code with example usage: obj.test_calibration_correctness_bulk() without return types