pandas 0.7.3 documentation

pandas.stats.moments.ewmstd

pandas.stats.moments.ewmstd(arg, com=None, span=None, min_periods=0, bias=False, time_rule=None)

Exponentially-weighted moving std

Parameters :

arg : Series, DataFrame

com : float. optional

Center of mass: alpha = com / (1 + com),

span : float, optional

Specify decay in terms of span, alpha = 2 / (span + 1)

min_periods : int, default 0

Number of observations in sample to require (only affects beginning)

time_rule : {None, ‘WEEKDAY’, ‘EOM’, 'W@MON‘, ...}, default None

Name of time rule to conform to before computing statistic

bias : boolean, default False

Use a standard estimation bias correction

Returns :

y : type of input argument

Notes

Either center of mass or span must be specified

EWMA is sometimes specified using a “span” parameter s, we have have that the decay parameter alpha is related to the span as \alpha = 1 - 2 / (s + 1)
= c / (1 + c)

where c is the center of mass. Given a span, the associated center of mass is c = (s - 1) / 2

So a “20-day EWMA” would have center 9.5.