qis.infer_annualisation_factor_from_df

qis.infer_annualisation_factor_from_df(data)[source]

the number of periods per year implied by a frame’s index frequency.

The factor volatility is scaled by: 252 for business days (BUS_DAYS_PER_YEAR), 12 for month-ends, and so on, as returned by get_annualization_factor. It is inferred rather than assumed, because getting it wrong rescales every reported volatility and Sharpe ratio silently.

Parameters:

data (DataFrame | Series) – frame or series with a date index. Fewer than three observations cannot support an inference. Valid semi-month frequency metadata takes precedence because a short sample can resemble fixed-day data and its general cadence is not recoverable from spacing.

Returns:

periods per year. Falls back to the business-day count with a UserWarning when neither inference nor supported index metadata identifies the frequency

Return type:

float