qis.prices_at_freq¶
- qis.prices_at_freq(prices, freq=None, include_start_date=False, include_end_date=False, ffill_nans=True, fill_na_method='ffill')[source]¶
Resample prices to specified frequency.
- Parameters:
freq (str | None) – Target frequency (e.g., ‘D’, ‘W’, ‘M’)
include_start_date (bool) – Include period start in resampling
include_end_date (bool) – Include period end in resampling
ffill_nans (bool) – Forward-fill NaN values. With
freqset, the fill is applied on the source grid and at the boundaries when prices are resampled. Input whose inferred frequency already equalsfreqis returned unchanged, missing values included: on its own grid a missing value is a missing observation, and filling it would manufacture a zero return. Passfreq=Noneto fill such inputfill_na_method (str | None) – Method for filling NaN (‘ffill’, ‘bfill’, None) when
freqis None
- Returns:
Resampled price time series
- Return type:
Note
A prices index that is not in chronological order is sorted first: the fill below runs in row order, and every return computed downstream differences adjacent rows.