code: def setUp(self):
      self._american_option_1 = american_option_pb2.AmericanEquityOption(
          short_position=True,
          expiry_date=date_pb2.Date(year=2022, month=5, day=21),
          contract_amount=decimal_pb2.Decimal(units=10000),
          strike=decimal_pb2.Decimal(units=1500),
          equity="GOOG",
          currency=Currency.USD(),
          business_day_convention=BusinessDayConvention.MODIFIED_FOLLOWING(),
          settlement_days=2,
          is_call_option=False,
      )
  
      self._american_option_2 = (
          american_option_pb2.AmericanEquityOption(
              short_position=True,
              expiry_date=date_pb2.Date(year=2022, month=3, day=21),
              contract_amount=decimal_pb2.Decimal(units=10000),
              strike=decimal_pb2.Decimal(units=590),
              equity="EZJ",
              currency=Currency.GBP(),
              business_day_convention=BusinessDayConvention.FOLLOWING(),
              settlement_days=2,
              is_call_option=False,
          )
      )
  
      self._american_option_3 = american_option_pb2.AmericanEquityOption(
          short_position=True,
          expiry_date=date_pb2.Date(year=2022, month=2, day=21),
          contract_amount=decimal_pb2.Decimal(units=10000),
          strike=decimal_pb2.Decimal(units=590),
          equity="EZJ",
          currency=Currency.GBP(),
          business_day_convention=BusinessDayConvention.MODIFIED_FOLLOWING(),
          settlement_days=2,
          is_call_option=True,
      )
      risk_free_dates = [
          [2021, 2, 8],
          [2022, 2, 8],
          [2023, 2, 8],
          [2025, 2, 8],
          [2027, 2, 8],
          [2030, 2, 8],
          [2050, 2, 8],
      ]
      risk_free_discounts = [
          0.97197441,
          0.94022746,
          0.91074031,
          0.85495089,
          0.8013675,
          0.72494879,
          0.37602059,
      ]
  
      vol_dates = [
          [2021, 2, 8],
          [2022, 2, 8],
          [2023, 2, 8],
          [2025, 2, 8],
          [2027, 2, 8],
      ]
      strikes_goog = [
          [1450, 1500, 1550],
          [1450, 1500, 1550],
          [1450, 1500, 1550],
          [1450, 1500, 1550],
          [1450, 1500, 1550],
      ]
      strikes_ezj = [
          [570, 590, 610],
          [570, 590, 610],
          [570, 590, 610],
          [570, 590, 610],
          [570, 590, 610],
      ]
      volatilities = [
          [0.1, 0.12, 0.13],
          [0.15, 0.2, 0.15],
          [0.1, 0.2, 0.1],
          [0.1, 0.2, 0.1],
          [0.1, 0.1, 0.3],
      ]
      self._market_data_dict = {
          "rates": {
              "USD": {
                  "risk_free_curve": {
                      "dates": risk_free_dates,
                      "discounts": risk_free_discounts,
                  }
              },
              "GBP": {
                  "risk_free_curve": {
                      "dates": risk_free_dates,
                      "discounts": risk_free_discounts,
                  }
              },
          },
          "equities": {
              "USD": {
                  "GOOG": {
                      "spot_price": 1500,
                      "volatility_surface": {
                          "dates": vol_dates,
                          "strikes": strikes_goog,
                          "implied_volatilities": volatilities,
                      },
                  }
              },
              "GBP": {
                  "EZJ": {
                      "spot_price": 590,
                      "volatility_surface": {
                          "dates": vol_dates,
                          "strikes": strikes_ezj,
                          "implied_volatilities": volatilities,
                      },
                  }
              },
          },
          "reference_date": [(2021, 2, 5)],
      }
      super(AmericanEquityOptionTest, self).setUp()
  
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 1 for calling the AmericanEquityOptionTest obj's underlying member method code with example usage: obj.setUp() without return types