pydata/pandas — pull request #7926 by seth-p (2014-08-04 16:34:07+00:00)
Title: BUG: ewmvar/cov debiasing factors

Closes https://github.com/pydata/pandas/issues/7912.

Still in progress. Need to test correctness and performance.

This code corrects the bias correction factor for exponentially weighted (co)variance calculations. The prior factor was the asymptotic value for an infinite number of observations.

As a result of this change, ``ewmvar/cov`` will now return ``NaN`` for the (co)variance of a single value when ``bias=False``, and ``0`` when ``bias=True``. Previously they always returned ``0`` for a single value. See also https://github.com/pydata/pandas/issues/7900.

This code also adds ``adjust`` arguments to ``ewmvar``, ``ewmstd``, ``ewmvol``, ``ewmcov``, and ``ewmcorr``. If ok, I'd like to reorder the parameters to be more logical and consistent, but for now I just added ``adjust=True`` to the end of the arguments list.