class_docstr: Tests are loosely based on real market prices for GOOG call options.
  
  The quotes for GOOG210820C* were taken on 2021-05-28 from
  https://finance.yahoo.com/quote/GOOG/options?date=1629417600
class_docstr_tok: ["Tests","are","loosely","based","on","real","market","prices","for","GOOG","call","options",".","The","quotes","for","GOOG210820C","*","were","taken","on","2021-05-28","from","https",":","\/\/finance.yahoo.com\/quote\/GOOG\/options","?","date=1629417600"]
code: def test_model_well_approximates_target_variance(
      self, optimizer_fn, rtol
  ):
      svi_parameters, converged, _ = self.evaluate(
          tff.experimental.svi.calibration(
              forwards=self.forwards,
              expiries=self.expiries,
              strikes=self.strikes,
              volatilities=self.volatilities,
              optimizer_fn=optimizer_fn,
              tolerance=1e-4,
          )
      )
      self.assertTrue(converged.all())
  
      total_variance = self.volatilities**2 * self.expiries
      model_variance = self.evaluate(
          tff.experimental.svi.total_variance_from_raw_svi_parameters(
              svi_parameters=svi_parameters,
              forwards=self.forwards,
              strikes=self.strikes,
          )
      )
      self.assertAllClose(
          model_variance, total_variance, rtol=rtol, atol=1e-4
      )
  
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 4 for calling the RealMarketDataCalibrationTest obj's underlying member method code with example usage: obj.test_model_well_approximates_target_variance(optimizer_fn, rtol) without return types