class_docstr: Represents a collection of futures linked to an average of overnight rates.
  
  Overnight index futures are exchange traded futures contracts where the
  underlying reference rates are the published overnight rates such as
  Secured Overnight Financing Rate (SOFR), Effective Fed Funds Rate (EFFR) etc.
  These contracts are generally cash settled where the settlement price is
  evaluated on the basis of realized reference rate values during the contract
  reference period (or delivery period). Typically the settlement price is
  based on componding the published daily reference rate during the delivery
  period or based on the arithmetic average of the reference rate during the
  delivery period.
  An overnight index future contract on the settlement date T settles at the
  price
  
  `100 * (1 - R)`
  
  If R is evaluated based on compunding the realized index values during the
  reference period then:
  
  `R = [Product[(1 + tau_i * r_i), 1 <= i <= N] - 1] / Sum[tau_i, 1 <= i <= N]`
  
  If R is evaluated based on the arithmetic average of the realized index
  during the reference period, then:
  
  `R = Sum(r_i, 1 <= i <= N)  / N`
  
  where `i` is the variable indexing the business days within the delivery
  period, tau_i denotes the year fractions between successive business days
  taking into account the appropriate daycount convention and N is the number of
  calendar days in the delivery period. See [1] for SOFR futures on CME.
  
  The OvernightIndexLinkedFutures class can be used to create and price multiple
  contracts simultaneously. However all contracts within an object must be
  priced using a common reference curve.
  
  #### Example:
  The following example illustrates the construction of an overnight index
  future instrument and calculating its price.
  
  ```python
  
  import numpy as np
  import tensorflow as tf
  import tf_quant_finance as tff
  
  dates = tff.datetime
  instruments = tff.experimental.instruments
  
  dtype = np.float64
  notional = 1.
  contract_start_date = dates.convert_to_date_tensor([(2021, 2, 8)])
  contract_end_date = dates.convert_to_date_tensor([(2021, 5, 8)])
  valuation_date = dates.convert_to_date_tensor([(2020, 2, 8)])
  
  future = instruments.OvernightIndexLinkedFutures(
      contract_start_date, contract_end_date, dtype=dtype)
  
  curve_dates = valuation_date + dates.periods.months([1, 2, 3, 12, 24, 60])
  reference_curve = instruments.RateCurve(
      curve_dates,
      np.array([0.02, 0.025, 0.0275, 0.03, 0.035, 0.0325], dtype=dtype),
      dtype=dtype)
  
  market = instruments.InterestRateMarket(reference_curve=reference_curve,
                                          discount_curve=None)
  
  price = future.price(valuation_date, market)
  
  #### References:
  [1]: SOFR futures settlement calculation.
  https://www.cmegroup.com/education/files/sofr-futures-settlement-calculation-methodologies.pdf
docstr: Returns the price of the contract on the valuation date.
  
  Args:
    valuation_date: A scalar `DateTensor` specifying the date on which
      valuation is being desired.
    market: An object of type `InterestRateMarket` which contains the
      necessary information for pricing the FRA instrument.
    model: Reserved for future use.
    name: Python string. The name to give this op.
      Default value: `None` which maps to `price`.
  
  Returns:
    A Rank 1 `Tensor` of real type containing the modeled price of each
    futures contract based on the input market data.
docstr_tok: ["Returns","the","price","of","the","contract","on","the","valuation","date",".","Args",":","valuation_date",":","A","scalar","`","DateTensor","`","specifying","the","date","on","which","valuation","is","being","desired",".","market",":","An","object","of","type","`","InterestRateMarket","`","which","contains","the","necessary","information","for","pricing","the","FRA","instrument",".","model",":","Reserved","for","future","use",".","name",":","Python","string",".","The","name","to","give","this","op",".","Default","value",":","`","None","`","which","maps","to","`","price","`",".","Returns",":","A","Rank","1","`","Tensor","`","of","real","type","containing","the","modeled","price","of","each","futures","contract","based","on","the","input","market","data","."]
code: def price(self, valuation_date, market, model=None, name=None):
      """Returns the price of the contract on the valuation date.
  
      Args:
        valuation_date: A scalar `DateTensor` specifying the date on which
          valuation is being desired.
        market: An object of type `InterestRateMarket` which contains the
          necessary information for pricing the FRA instrument.
        model: Reserved for future use.
        name: Python string. The name to give this op.
          Default value: `None` which maps to `price`.
  
      Returns:
        A Rank 1 `Tensor` of real type containing the modeled price of each
        futures contract based on the input market data.
      """
  
      del model, valuation_date
  
      name = name or (self._name + "_price")
      with tf.name_scope(name):
          reference_curve = market.reference_curve
  
          df1 = reference_curve.get_discount_factor(
              self._accrual_start_dates
          )
          df2 = reference_curve.get_discount_factor(
              self._accrual_end_dates
          )
  
          fwd_rates = (df1 / df2 - 1.0) / self._accrual_daycount
  
          total_accrual = tf.math.segment_sum(
              self._daycount_fractions, self._contract_idx
          )
          if self._averaging_type == rc.AverageType.ARITHMETIC_AVERAGE:
              settlement_rate = (
                  tf.math.segment_sum(
                      fwd_rates * self._daycount_fractions,
                      self._contract_idx,
                  )
                  / total_accrual
              )
          else:
              settlement_rate = (
                  tf.math.segment_prod(
                      1.0 + fwd_rates * self._daycount_fractions,
                      self._contract_idx,
                  )
                  - 1.0
              ) / total_accrual
  
          return 100.0 * (1.0 - settlement_rate)
  
imports: import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance.experimental.instruments import rates_common
label_desc: Use image node_id 2 for calling the OvernightIndexLinkedFutures obj's underlying member method code with example usage: obj.price(valuation_date, market, model, name) and returns: unknown