Skip to content

ConstantQLRiskFreeRateEstimator

QuantConnect.Securities.Option.ConstantQLRiskFreeRateEstimator

ConstantQLRiskFreeRateEstimator(
    risk_free_rate: float = 0.01,
)

Bases: Object, IQLRiskFreeRateEstimator

Class implements default flat risk free curve, implementing IQLRiskFreeRateEstimator.

Constructor initializes class with risk free rate constant

Parameters:

Name Type Description Default
risk_free_rate float
0.01

estimate

estimate(
    security: Security,
    slice: Slice,
    contract: OptionContract,
) -> float

Returns current flat estimate of the risk free rate

Parameters:

Name Type Description Default
security Security

The option security object

required
slice Slice

The current data slice. This can be used to access other information available to the algorithm

required
contract OptionContract

The option contract to evaluate

required

Returns:

Type Description
float

The estimate.