qis.compute_ewm_vector_autocorr_df

qis.compute_ewm_vector_autocorr_df(data, span=30, lag=1, is_normalize=True, var_init_type=InitType.ZERO)[source]

EWM autocorrelation ratio of each column after removing its EWM mean.

Sets z_t = x_t - m_t with m_t the EWM mean of qis.compute_ewm() at the same span (seeded at the first observation and including x_t, so point in time) and runs compute_ewm_vector_autocorr() on z.

Parameters:
  • data (DataFrame | Series) – observations, rows are dates

  • span (int | ndarray) – EWM span of the mean and of the moments, in rows

  • lag (int) – lag in rows

  • is_normalize (bool) – return the ratio; False returns the EWM lagged moment

  • var_init_type (InitType) – seed of the second moment; InitType.ZERO (default) is point in time, InitType.VAR the full-sample variance seed, which looks ahead

Returns:

the estimates in the container of data, NaN for the first lag rows

Return type:

DataFrame | Series