gs_quant.timeseries.technicals.exponential_spread_volatility

exponential_spread_volatility(x, beta=0.75)[source]

Exponentially weighted spread volatility

Parameters:
  • x (Series) – time series of prices

  • beta (float) – how much to weigh the previous price in the time series, thus controlling how much importance we place on the (more distant) past. Must be between 0 (inclusive) and 1 (exclusive)

Return type:

Series

Returns:

date-based time series of exponential spread volatility of the input series

Usage

Exponentially weights the daily differences of the input series, calculates the annualized standard deviation

Examples

Generate price series and compute exponentially weighted standard deviation of returns

>>> prices = generate_series(100)
>>> exponential_volatility(prices, 0.9)

The above is equivalent to

>>> annualize(exponential_std(diff(prices, 1), 0.9))

See also

volatility() exponential_std() exponential_volatility()