Technical indicators#
Market indicators: trend, momentum, bands, volume, and returns.
Trend#
Direction and trend-following: trend-tracking averages, slope fits, ADX, and channels.
Function |
Description |
|---|---|
Wilder's ADX with +DI and -DI (3 inputs -> 3 outputs). |
|
Causal one-step-ahead predictive mean and std plus current slope and intercept via Normal-Inverse-Gamma posterior. |
|
Mulloy's Double EMA: 2*EMA - EMA(EMA). |
|
x[t] minus its rolling mean. |
|
Trend-following envelope: rolling max(high), rolling min(low), and midline. |
|
Running OLS slope of the series against time over the whole history. |
|
Hull's responsive MA: WMA(2*WMA(n/2) - WMA(n), sqrt(n)). |
|
Adaptive MA whose smoothing constant responds to the efficiency ratio. |
|
MACD line, signal line, and histogram (3 outputs). |
|
Rolling-window Hurst exponent via Anis-Lloyd corrected rescaled-range analysis. |
|
Full OLS fit returning (slope, intercept, r_squared, stderr). |
|
OLS fit y = a + b*t over a trailing window. derivative_order selects value/slope/zero. |
|
OLS fit y = a + b*t + c*t^2 over a trailing window. |
|
Linear regression of y on time, projected one step ahead. TA-Lib's TSF. |
|
Mulloy's Triple EMA: 3*EMA - 3*EMA(EMA) + EMA(EMA(EMA)). |
|
ROC of a triple-smoothed EMA. |
Momentum & oscillators#
Rate-of-change and overbought/oversold indicators.
Function |
Description |
|---|---|
Difference of fast and slow EMA of the Accumulation/Distribution line. |
|
Wilder's ADX with +DI and -DI (3 inputs -> 3 outputs). |
|
(close - open) / (high - low) per bar. No smoothing. |
|
Commodity Channel Index over typical price. |
|
MACD line, signal line, and histogram (3 outputs). |
|
Volume-weighted analogue of RSI on the typical price. |
|
x[t] - x[t-k], TA-Lib's MOM. Mathematically identical to Diff(k). |
|
100 * (x[t] / x[t-k] - 1) - TA-Lib's ROC. |
|
Relative Strength Index. Wilder's smoothing by default; Cutler's via method='cutler'. |
|
Stochastic oscillator %K and %D (3 inputs -> 2 outputs). |
|
Stochastic applied to RSI (1 input -> 2 outputs). |
|
ROC of a triple-smoothed EMA. |
|
Three-period weighted oscillator (Williams, 1976). |
|
Inverse stochastic oscillator in [-100, 0]. |
Bands & channels#
Envelopes around price.
Function |
Description |
|---|---|
Mean +/- num_std rolling standard deviations. |
|
Trend-following envelope: rolling max(high), rolling min(low), and midline. |
|
Volatility-adapted envelope: EMA midline plus/minus a multiple of ATR. |
Volume#
Volume-based indicators.
Function |
Description |
|---|---|
Chaikin Accumulation/Distribution Line. |
|
Difference of fast and slow EMA of the Accumulation/Distribution line. |
|
Volume-weighted analogue of RSI on the typical price. |
|
On-Balance Volume: signed cumulative volume by close-direction (Granville, 1963). |
|
Rolling volume-weighted average price (typical-price weighted). |
Returns & changes#
Differences, returns, rates of change, and lags.
Function |
Description |
|---|---|
x[t] - x[t-k] (first difference at lag k). |
|
Second-order finite difference (discrete second derivative). |
|
Output is the input delayed by k samples. |
|
log(x[t] / x[t-k]) - log return at lag k. |
|
x[t] - x[t-k], TA-Lib's MOM. Mathematically identical to Diff(k). |
|
(x[t] - x[t-k]) / x[t-k] - the simple percentage return at lag k. |
|
100 * (x[t] / x[t-k] - 1) - TA-Lib's ROC. |
|
x[t] / x[t-k] - 1 - TA-Lib's ROCP. Identical to Return. |
|
x[t] / x[t-k] - TA-Lib's ROCR. |