qis.get_excess_returns_nav

qis.get_excess_returns_nav(prices, funding_rate, freq='B')[source]

Compute excess return NAV after funding costs.

The funding cost of the period (t-1, t] on the freq grid is the annual rate known at t-1 times the ACT/365 fraction of the period, as in compute_excess_returns. The NAV is one on each column’s first price date, so the first period’s excess return is compounded, and the path is then rescaled so that its last level equals the last price.

Parameters:
  • prices (DataFrame | Series) – Price time series

  • funding_rate (Series) – Funding rate time series (annualized)

  • freq (str) – Return calculation frequency

Returns:

Excess return NAV on the freq grid, scaled to match the terminal price

Return type:

DataFrame | Series