Skip to content

ExponentialMovingAverage


class backtide.indicators.ExponentialMovingAverage(period=14)

Exponential Moving Average (EMA).

A weighted moving average that gives exponentially more weight to recent prices, making it more responsive to new information than the SMA. Useful for faster trend detection, reducing lag in crossover systems, and as a building block for other indicators (MACD, ADX).

Formula:

\[EMA_t = \alpha \cdot C_t + (1 - \alpha) \cdot EMA_{t-1}\]

where \(\alpha = \frac{2}{n + 1}\). Read more on Wikipedia.

Parameters

period : int, default=14

Look-back window length.

Attributes

acronym : str

Short ticker-style acronym.

name : str
Human-readable indicator name.


See Also

MovingAverageConvergenceDivergence

Moving Average Convergence Divergence (MACD).

SimpleMovingAverage

Simple Moving Average (SMA).

WeightedMovingAverage

Weighted Moving Average (WMA).


Methods

compute Compute the indicator on a dataset.
description Short explanation of what the indicator measures.


method backtide.indicatorscompute(data)

Compute the indicator on a dataset.

Parameters

data : np.ndarray | pd.DataFrame | pl.DataFrame

Historical OHLCV data.

Returns

np.ndarray | pd.Series | pl.Series | pd.DataFrame | pl.DataFrame

The computed values. For multi-output indicators (e.g., upper and lower bounds), return a 2d structure.



method backtide.indicatorsdescription()

Short explanation of what the indicator measures.

Returns

str

The description.