class_docstr: Represents an interest rate curve.
docstr: Returns the simply accrued forward rate between [start_dt, maturity_dt].
  
  Args:
    start_date: A `DateTensor` specifying the start of the accrual period
      for the forward rate.
    maturity_date: A `DateTensor` specifying the end of the accrual period
      for the forward rate. The shape of `maturity_date` must be the same
      as the shape of the `DateTensor` `start_date`.
    daycount_fraction: An optional `Tensor` of real dtype specifying the
      time between `start_date` and `maturity_date` in years computed using
      the forward rate's day count basis. The shape of the input should be
      the same as that of `start_date` and `maturity_date`.
      Default value: `None`, in which case the daycount fraction is computed
      using `ACTUAL_365` convention.
  
  Returns:
    A real tensor of same shape as the inputs containing the simply compounded
    forward rate.
docstr_tok: ["Returns","the","simply","accrued","forward","rate","between","[","start_dt",",","maturity_dt","]",".","Args",":","start_date",":","A","`","DateTensor","`","specifying","the","start","of","the","accrual","period","for","the","forward","rate",".","maturity_date",":","A","`","DateTensor","`","specifying","the","end","of","the","accrual","period","for","the","forward","rate",".","The","shape","of","`","maturity_date","`","must","be","the","same","as","the","shape","of","the","`","DateTensor","`","`","start_date","`",".","daycount_fraction",":","An","optional","`","Tensor","`","of","real","dtype","specifying","the","time","between","`","start_date","`","and","`","maturity_date","`","in","years","computed","using","the","forward","rate","'s","day","count","basis",".","The","shape","of","the","input","should","be","the","same","as","that","of","`","start_date","`","and","`","maturity_date","`",".","Default","value",":","`","None","`",",","in","which","case","the","daycount","fraction","is","computed","using","`","ACTUAL_365","`","convention",".","Returns",":","A","real","tensor","of","same","shape","as","the","inputs","containing","the","simply","compounded","forward","rate","."]
code: def get_forward_rate(
      self, start_date, maturity_date, daycount_fraction=None
  ):
      """Returns the simply accrued forward rate between [start_dt, maturity_dt].
  
      Args:
        start_date: A `DateTensor` specifying the start of the accrual period
          for the forward rate.
        maturity_date: A `DateTensor` specifying the end of the accrual period
          for the forward rate. The shape of `maturity_date` must be the same
          as the shape of the `DateTensor` `start_date`.
        daycount_fraction: An optional `Tensor` of real dtype specifying the
          time between `start_date` and `maturity_date` in years computed using
          the forward rate's day count basis. The shape of the input should be
          the same as that of `start_date` and `maturity_date`.
          Default value: `None`, in which case the daycount fraction is computed
          using `ACTUAL_365` convention.
  
      Returns:
        A real tensor of same shape as the inputs containing the simply compounded
        forward rate.
      """
      start_date = dates.convert_to_date_tensor(start_date)
      maturity_date = dates.convert_to_date_tensor(maturity_date)
      if daycount_fraction is None:
          daycount_fraction = dates.daycount_actual_365_fixed(
              start_date=start_date,
              end_date=maturity_date,
              dtype=self._dtype,
          )
      else:
          daycount_fraction = tf.convert_to_tensor(
              daycount_fraction, self._dtype
          )
      dfstart = self.get_discount_factor(start_date)
      dfmaturity = self.get_discount_factor(maturity_date)
      return (dfstart / dfmaturity - 1.0) / daycount_fraction
  
file_path: tf-quant-finance/tf_quant_finance/experimental/instruments/rate_curve.py
imports: import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance.math.interpolation import linear
label_desc: Use image node_id 4 for calling the RateCurve obj's underlying member method code with example usage: obj.get_forward_rate(start_date, maturity_date, daycount_fraction) and returns: unknown