def call_cython(arg, window, minp, args=(), kwargs={}, **kwds): minp = check_minp(minp, window) return func(arg, window, minp, **kwds) return _rolling_moment(arg, window, call_cython, min_periods, freq=freq, center=center, how=how, **kwargs) return f rolling_max = _rolling_func(algos.roll_max2, 'Moving maximum.', how='max') rolling_min = _rolling_func(algos.roll_min2, 'Moving minimum.', how='min') rolling_sum = _rolling_func(algos.roll_sum, 'Moving sum.') rolling_mean = _rolling_func(algos.roll_mean, 'Moving mean.') rolling_median = _rolling_func(algos.roll_median_cython, 'Moving median.', how='median') _ts_std = lambda *a, **kw: _zsqrt(algos.roll_var(*a, **kw)) rolling_std = _rolling_func(_ts_std, 'Unbiased moving standard deviation.', check_minp=_require_min_periods(1)) rolling_var = _rolling_func(algos.roll_var, 'Unbiased moving variance.', check_minp=_require_min_periods(1)) rolling_skew = _rolling_func(algos.roll_skew, 'Unbiased moving skewness.', check_minp=_require_min_periods(3)) rolling_kurt = _rolling_func(algos.roll_kurt, 'Unbiased moving kurtosis.', check_minp=_require_min_periods(4)) def rolling_quantile(arg, window, quantile, min_periods=None, freq=None, center=False): """Moving quantile. Parameters
def f(arg, *args, **kwargs): minp = _require_min_periods(1)(self.min_periods, window) return _zsqrt(algos.roll_var(arg, window, minp, ddof))
center=center, how=how, **kwargs) return f rolling_max = _rolling_func(algos.roll_max2, 'Moving maximum.', how='max') rolling_min = _rolling_func(algos.roll_min2, 'Moving minimum.', how='min') rolling_sum = _rolling_func(algos.roll_sum, 'Moving sum.') rolling_mean = _rolling_func(algos.roll_mean, 'Moving mean.') rolling_median = _rolling_func(algos.roll_median_cython, 'Moving median.', how='median') _ts_std = lambda *a, **kw: _zsqrt(algos.roll_var(*a, **kw)) rolling_std = _rolling_func(_ts_std, 'Unbiased moving standard deviation.', check_minp=_require_min_periods(1)) rolling_var = _rolling_func(algos.roll_var, 'Unbiased moving variance.', check_minp=_require_min_periods(1)) rolling_skew = _rolling_func(algos.roll_skew, 'Unbiased moving skewness.', check_minp=_require_min_periods(3)) rolling_kurt = _rolling_func(algos.roll_kurt, 'Unbiased moving kurtosis.', check_minp=_require_min_periods(4)) def rolling_quantile(arg,