docstr: Tests continuation value returns the discounted sum of later payoffs.
docstr_tok: ["Tests","continuation","value","returns","the","discounted","sum","of","later","payoffs","."]
code: def test_continuation_value(self):
      """Tests continuation value returns the discounted sum of later payoffs."""
      exercise_index = 2
      for dtype in (np.float32, np.float64):
          discount_factors = tf.constant(
              [[1.0, 0.9, 0.8, 0.7, 0.6]], dtype=dtype
          )
          cashflow = tf.ones(shape=[10, 5, 4], dtype=dtype)
          continuation_value = lsm.continuation_value_fn(
              cashflow, discount_factors, exercise_index
          )
          expected_continuation = 1.625 * np.ones([10, 5])
          self.assertAllClose(
              continuation_value,
              expected_continuation,
              rtol=1e-8,
              atol=1e-8,
          )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/lsm_algorithm/lsm_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tf_quant_finance.experimental.lsm_algorithm import lsm
  from tf_quant_finance.experimental.lsm_algorithm import payoff
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 3 for calling the LsmTest obj's underlying member method code with example usage: obj.test_continuation_value() without return types