qis.interpolate_infrequent_returns¶
- qis.interpolate_infrequent_returns(infrequent_returns, pivot_returns, span=12, annualization_factor=260, is_to_log_returns=False, vol_adjustment=1.0)[source]¶
backfill an infrequently reported series onto a frequent grid with a Brownian bridge.
A quarterly private-market series cannot be risk-analysed against daily public markets, and forward-filling it makes it look riskless between reports. This interpolates instead: between two reports the log NAV follows a Brownian bridge pinned to both reported values, and the bridge increments take their timing from
pivot_returns, so the interpolated series moves with a real market rather than along a smooth line.Report
bis placed on the last pivot date on or before its report date. Over thenpivot dates of a report interval, with reported log returnl, the interpolated log returns arex_j = l / n + vol_adjustment * sqrt(v) * e_j. Heree_jare the pivot returns of the interval, demeaned and scaled so thatsum(e_j**2) = n - 1, the expected sum of squares of the demeaned increments of a unit Brownian motion, andvis the per-pivot-period variance of the reported returns: an EWM, with spanspanreports, ofl**2 / nover the intervals up to and including the current one. Becauseesums to zero, the interval’s log returns sum exactly tol. Their sum of squares isl**2 / n + vol_adjustment**2 * v * (n - 1), so withvol_adjustment=1the increments carry, per pivot period, the variance of the reported returns under the square-root-of-time rule, and under a Brownian motion observed at the report dates they are, on average, serially uncorrelated.The interval ending at a report uses only the pivot returns inside it and the reports up to and including it, so the interpolated history up to a report date does not change when later data arrive. It is a plausible history, not the true one, and inherits the bridge’s assumptions: it belongs in a risk model and not in a performance report.
- Parameters:
infrequent_returns (Series | DataFrame) – the reported returns, one per report date, in the convention set by
is_to_log_returns. A Series must not contain missing values; a DataFrame is handled column by column after dropping each column’s missing valuespivot_returns (Series) – a frequent series whose path supplies the timing of the increments; the result is returned on its index. Missing pivot returns contribute no deviation
span (int) – EWM span, in reports, of the per-pivot-period variance of the reported returns
annualization_factor (float) – periods per year of
pivot_returns. Both the bridge variance and the reported-return variance are measured on the pivot clock, so the interpolated path does not depend on this value; the bridge volatility per year isvol_adjustment * sqrt(annualization_factor * v)is_to_log_returns (bool) – False (default) for simple returns, which are converted with
log1pfor the bridge and returned as simple returns that compound exactly to each reported return; True for log returns, returned as log returns that sum exactly to each reported returnvol_adjustment (float) – multiplier on the bridge volatility. The default 1 keeps the variance of the reported returns; a value above one adds variance, for example to offset the smoothing of appraisal-based reports
- Returns:
the interpolated returns on the index of
pivot_returns, in the shape of the input. Dates up to the first placed report and after the last one are missing. A report interval that contains no pivot date is merged with the next one, whose increments then reproduce the two reports together- Raises:
TypeError – If a nonempty input does not use a
DatetimeIndex.ValueError – If a nonempty input index contains
NaT, or ifinfrequent_returnscontains missing values.
- Return type: