min

min_(x, w=Window(w=None, r=0))[source]

Minimum value of series over given window

Parameters
  • x (Series) – series: timeseries

  • w (Union[Window, int]) – Window or int: number of observations and ramp up to use. e.g. Window(22, 10) where 22 is the window size

and 10 the ramp up value. Window size defaults to length of series. :rtype: Series :return: timeseries of minimum value

Usage

Returns the minimum value of the series over each window:

\(R_t = min(X_{t-w+1}:X_t)\)

where \(w\) is the size of the rolling window. If window is not provided, returns the minimum value over the full series. If the window size is greater than the available data, will return minimum of available values.

Examples

Minimum value of price series over the last \(22\) observations:

>>> prices = generate_series(100)
>>> min_(prices, 22)

See also

max_()