qs.reports.html() function assumes the risk free rate is constant
Author: massiccioCreated Jun 5, 2026Updated Jun 5, 2026
def html(
returns,
benchmark=None,
rf=0.0,
grayscale=False,
title="Strategy Tearsheet",
output=None,
compounded=True,
periods_per_year=252,
download_filename="quantstats-tearsheet.html",
figfmt="svg",
template_path=None,
match_dates=True,
**kwargs,
):Since returns is a series / data frame, wouldn't it be more accurate to allow the risk free to be a time series? the risk free rate changes over time, so when testing strategies spanning several years, assuming it is constant makes the calculations imprecise
Source: ranaroussi/quantstats