statsmodels.sandbox.tsa.movstat.movvar

statsmodels.sandbox.tsa.movstat.movvar(x, windowsize=3, lag='lagged')[source]

moving window variance

Parameters:
  • x (array) – time series data
  • windsize (int) – window size
  • lag ('lagged', 'centered', or 'leading') – location of window relative to current position
Returns:

mk – moving variance, with same shape as x

Return type:

array