<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.experimental.instruments.ratecurve_from_discounting_function" />
<meta itemprop="path" content="Stable" />
</div>

# tf_quant_finance.experimental.instruments.ratecurve_from_discounting_function

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/experimental/instruments/rate_curve.py">View source</a>



Returns `RateCurve` object using the supplied function for discounting.

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



<!-- Placeholder for "Used in" -->


#### Args:


* <b>`discount_fn`</b>: A python callable which takes a `DateTensor` as an input and
  returns the corresponding discount factor as an output.
* <b>`dtype`</b>: `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.
