Skip to content

FuncRiskFreeRateInterestRateModel

QuantConnect.Data.FuncRiskFreeRateInterestRateModel

FuncRiskFreeRateInterestRateModel(
    get_interest_rate_func: Any,
)
FuncRiskFreeRateInterestRateModel(
    get_interest_rate_func: Callable[[datetime], float],
)

Bases: Object, IRiskFreeInterestRateModel

Constant risk free rate interest rate model

Signature descriptions:

  • Create class instance of interest rate provider with given PyObject

  • Create class instance of interest rate provider

get_interest_rate

get_interest_rate(date: Union[datetime, date]) -> float

Get interest rate by a given date

Parameters:

Name Type Description Default
date Union[datetime, date]

The date

required

Returns:

Type Description
float

Interest rate on the given date.