qis.compute_ewm_std1_norm¶
- qis.compute_ewm_std1_norm(data, span=260, mean_adj_type=MeanAdjType.EWMA, is_demean=True, is_nans_to_zero=True)[source]¶
smoothed, volatility-normalised signal with unit standard deviation for IID input.
With
x~_tthe (optionally demeaned) data andsigma_tits EWM volatility about zero, the output isc sqrt(N) EWM(x~ / sigma)_twithN = (1 + lambda) / (1 - lambda), the final EWM starting from a zero seed. Demeaning by the same-span EWMA removes the low-frequency content the final EWM keeps and leaves a standard deviation of1 / sqrt(1 + lambda)(0.71 at span 260) for IID input, so withis_demean=TrueandMeanAdjType.EWMAthe output is multiplied byc = sqrt(1 + lambda); otherwisec = 1. The output then has unit standard deviation for IID input in the stationary limit, with either setting.- Parameters:
data (DataFrame | Series) – observations, time along the first axis
span (float | ndarray) – EWM span of the mean, the volatility and the smoother
mean_adj_type (MeanAdjType) – mean removed when
is_demeanis Trueis_demean (bool) – remove the mean before normalising
is_nans_to_zero (bool) – replace missing outputs, including the warm-up, by zero
- Returns:
the normalised signal, same container as
data- Return type: