MCPcopy
hub / github.com/ranaroussi/quantstats / exponential_stdev

Function exponential_stdev

quantstats/utils.py:94–100  ·  view source on GitHub ↗

Returns series representing exponential volatility of returns

(returns, window=30, is_halflife=False)

Source from the content-addressed store, hash-verified

92
93
94def exponential_stdev(returns, window=30, is_halflife=False):
95 """Returns series representing exponential volatility of returns"""
96 returns = _prepare_returns(returns)
97 halflife = window if is_halflife else None
98 return returns.ewm(
99 com=None, span=window, halflife=halflife, min_periods=window
100 ).std()
101
102
103def rebase(prices, base=100.0):

Callers

nothing calls this directly

Calls 1

_prepare_returnsFunction · 0.85

Tested by

no test coverage detected