class_docstr: Tests for methods for the asian pricing module.
class_docstr_tok: ["Tests","for","methods","for","the","asian","pricing","module","."]
docstr: Tests for methods for the asian pricing module.
  
  Results come from 'Implementing Derivatives Model' by Clewlow, Strickland
  p.118-123, via the QuantLib test suite
docstr_tok: ["Tests","for","methods","for","the","asian","pricing","module",".","Results","come","from","'Implementing","Derivatives","Model","'","by","Clewlow",",","Strickland","p.118-123",",","via","the","QuantLib","test","suite"]
code: def test_option_prices(self):
      """Tests for methods for the asian pricing module.
  
      Results come from 'Implementing Derivatives Model' by Clewlow, Strickland
      p.118-123, via the QuantLib test suite
      """
      spots = np.array([100.0])
      dividend_rates = np.array([0.03])
      discount_rates = np.array([0.06])
      volatilities = np.array([0.2])
      strikes = np.array([100.0])
      expiries = 1.0
      sampling_times = np.linspace(0.1, 1, 10)[:, np.newaxis]
  
      expected_price = np.array([5.3425606635])
  
      computed_price = tff.black_scholes.asian_option_price(
          spots=spots,
          dividend_rates=dividend_rates,
          discount_rates=discount_rates,
          volatilities=volatilities,
          strikes=strikes,
          expiries=expiries,
          sampling_times=sampling_times,
      )
  
      self.assertAllClose(expected_price, computed_price, 1e-10)
  
file_path: tf-quant-finance/tf_quant_finance/black_scholes/asian_prices_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 AsianPriceTest obj's underlying member method code with example usage: obj.test_option_prices() without return types