gs_quant.timeseries.algebra.power

power(x, y=1)[source]

Raise each element in series to power

Parameters:
  • x (Series) – timeseries

  • y (float) – value

Return type:

Series

Returns:

date-based time series of square roots

Usage

Raise each value in time series \(X_t\) to the power \(y\):

\(R_t = X_t^{y}\)

Examples

Generate price series and raise each value to the power 2:

>>> prices = generate_series(100)
>>> power(prices, 2)

See also

sqrt()