macrosynergy.management.utils.frequency#
Infer per-observation release frequency from the spacing of end-of-period (eop) dates.
- infer_release_frequency(eop, window=3, freqs=('D', 'W', 'M', 'Q', 'A'))[source]#
Classify the release frequency of each observation from its local
eopcadence.The gap (in days) between consecutive distinct eop dates is smoothed with a rolling median (
window,min_periods=1) and snapped to the nearest supported frequency by log-distance to the reference period length (365.25 / ANNUALIZATION_FACTORS). Observations sharing an eop (revisions) inherit that period’s frequency.- Parameters:
- Returns:
per-observation frequency labels, aligned to the input index.
- Return type:
pd.Series
- Raises:
ValueError – if there are fewer than two distinct eop dates, so no gap can be computed to estimate a release frequency.