qis.to_quarterly_returns

qis.to_quarterly_returns(returns)[source]

Compound returns to quarter-end via NAV round-trip.

Masks any trailing partial quarter — i.e., a quarter whose end-of-quarter date falls in a calendar month later than the input’s last observed month. This matters at the current quarter boundary where monthly- reporting funds have posted Jan/Feb returns but not yet the full Q1 — without this drop, the resample would forward-fill a 2-month return as if it were a 3-month return.

The completeness check uses calendar months, not exact QE timestamps, so weekly (W-FRI) and business-month-end series compound correctly even though their stamps don’t land on calendar QE. (A previous implementation used returns.reindex(QE).notna(), which silently masked the entire output for any input whose stamps did not align with calendar QE.)

Used uniformly across all funds for schema consistency; for series that are already quarterly, this is effectively identity (single-obs quarters compound to themselves).

Parameters:

returns (Series | DataFrame)

Return type:

Series | DataFrame