class_docstr: Tests for methods for the american pricing module.
docstr: Tests Baron-Adesi Whaley prices at expiration.
docstr_tok: ["Tests","Baron-Adesi","Whaley","prices","at","expiration","."]
code: def test_option_prices_expiration(self):
      """Tests Baron-Adesi Whaley prices at expiration."""
      dtype = tf.float64
      computed_prices, converged, failed = adesi_whaley(
          volatilities=[0.2, 0.3, 0.4],
          strikes=[100],
          expiries=[0.0],
          spots=[90, 100, 110],
          tolerance=1e-08,
          is_call_options=[True],
          discount_rates=[0.0],
          dtype=dtype,
      )
      # Computed using tff.black_scholes.option_price_binomial
      expected_prices = [0.0, 0.0, 10.0]
      with self.subTest(name="ExpectedPrices"):
          self.assertAllClose(
              expected_prices, computed_prices, rtol=1e-4, atol=5e-4
          )
      with self.subTest(name="AllConverged"):
          self.assertAllEqual(converged, tf.ones_like(computed_prices))
      with self.subTest(name="NonFailed"):
          self.assertAllEqual(failed, tf.zeros_like(computed_prices))
  
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 7 for calling the AmericanPrice obj's underlying member method code with example usage: obj.test_option_prices_expiration() without return types