tf_quant_finance.experimental.instruments.ratecurve_from_discounting_function

Contents

Last updated: 2023-03-16.

tf_quant_finance.experimental.instruments.ratecurve_from_discounting_function#

View source

Returns RateCurve object using the supplied function for discounting.

tf_quant_finance.experimental.instruments.ratecurve_from_discounting_function(
    discount_fn, dtype=None
)

Args:#

  • discount_fn: A python callable which takes a DateTensor as an input and returns the corresponding discount factor as an output.

  • dtype: tf.Dtype. Optional input specifying the dtype of the real tensors and ops.

Returns:#

An object of class RateCurveFromDiscountingFunction which uses the supplied function for discounting.