qis.compute_rolling_mean_adj¶
- qis.compute_rolling_mean_adj(data, mean_adj_type=MeanAdjType.EWMA, span=None, ewm_lambda=0.94, init_type=InitType.X0, init_value=None, nan_backfill=NanBackfill.FFILL)[source]¶
observations minus their mean path under
mean_adj_type; seecompute_roll_mean().- Parameters:
data (DataFrame | Series | ndarray) – observations, time along the first axis
mean_adj_type (MeanAdjType) – which mean is removed;
INSAMPLEis forward-lookinginit_type (InitType) – EWMA seed when
init_valueis None;X0makes the first centred value 0nan_backfill (NanBackfill) – EWMA missing-observation policy
- Returns:
the centred data, same container and shape as
data- Raises:
ValueError – if
init_typeisInitType.VAR, a variance seed for a mean- Return type: