docstr: Creates and prices swap from a dictionary representation.
docstr_tok: ["Creates","and","prices","swap","from","a","dictionary","representation","."]
code: def test_create_constructor_args_price(self):
      """Creates and prices swap from a dictionary representation."""
      config = american_option.AmericanOptionConfig(
          num_samples=100,
          num_calibration_samples=50,
          num_exercise_times=10,
          seed=[1, 2],
      )
      am_option_dict = (
          american_option.AmericanOption.create_constructor_args(
              [self._american_option_1, self._american_option_3], config
          )
      )
      market = market_data.MarketDataDict(self._market_data_dict)
      am_options = american_option.AmericanOption(
          **list(am_option_dict.values())[0]
      )
      price = am_options.price(market)
      expected = np.array([4943331.4747, 413834.5428])
      self.assertAllClose(price, expected, rtol=1e-4, atol=1e-4)
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/equity_instruments/american_option/american_option_impl_test.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 5 for calling the AmericanEquityOptionTest obj's underlying member method code with example usage: obj.test_create_constructor_args_price() without return types