Skip to content

Indicators

Technical indicators are the inputs used by many QuantMage incantations, including If/Else, Switch, Enter/Exit, Mixed, and Filtered. This page summarizes the available indicators and how to interpret them.

This is the percentage return of an asset over a specific period. For example, the 1-day cumulative return of SPY is calculated as (Today's Price of SPY / Yesterday's Price of SPY - 1) x 100. Here, and in most other indicators, QuantMage typically uses daily closing prices.

RSI measures the momentum of price changes and is commonly used to identify overbought or oversold conditions.

  1. Range: RSI ranges from 0 to 100. Traditionally, values above 70 signal overbought conditions, while values below 30 suggest oversold conditions.
  2. Formula: The formula for RSI is:
    RSI = 100 - 100 / (1 + RS)
    Here, RS (Relative Strength) is the average of n days’ up closes divided by the average of n days’ down closes. The average used is an exponential moving average.
  1. Overbought/Oversold: As mentioned, levels above 70 might indicate a potential price pullback, while levels below 30 suggest a potential price bounce.
  2. Divergence: If an asset’s price hits a new high or low, but the RSI doesn’t follow suit, it’s a divergence. This can be a sign of a potential price reversal.

As with any indicator, RSI is best used alongside other indicators and analysis methods.

Volatility measures the magnitude of an asset’s price fluctuations. In QuantMage, it is defined as the standard deviation of returns. QuantMage also uses its inverse for weighting in Weighted and Filtered.

This indicator measures momentum over roughly one year using 1-month, 3-month, 6-month, and 12-month returns. More recent returns receive higher weight, which makes the signal more responsive:

(12 x (P0 / P1 - 1) + 4 x (P0 / P3 - 1) + 2 x (P0 / P6 - 1) + (P0 / P12 - 1)) / 19

Where Pn is the price n months ago. A value greater than zero indicates a bullish momentum.

This indicator is similar to 13612W, but it uses an unweighted average and therefore produces a slower signal:

((P0 / P1 - 1) + (P0 / P3 - 1) + (P0 / P6 - 1) + (P0 / P12 - 1)) / 4

Where Pn is the price n months ago. Again, a value greater than zero hints at a bullish momentum.

This provides another relative momentum signal over roughly one year. It is the slowest-moving of the three momentum indicators listed here:

13 x P0 / (P0 + P1 + ... + P12) - 1

Where Pn is the price n months ago.

This is the arithmetic mean of daily returns over a specific period.

This is the simple average of an asset’s daily close prices over a specific period.

This is a moving average that gives more weight to recent prices, making it more responsive to current market conditions. The weights for an n-day EMA are applied as follows:

W = 2 / (n + 1)
EMA = previous EMA x (1 - W) + current Price x W

Unlike EMA, which is a simple first-order smoothing filter, the Ultimate Smoother, developed by John Ehlers, subtracts the response of a high-pass filter from the input data to reduce lag. The result is a timelier signal with a slight trade-off in smoothness.

This measures the largest drop from a peak to a trough over a set period, helping you gauge the risk of an asset or strategy.

This measures the percentage drop from the all-time peak to the current price. You can combine it with a subspell to build a trailing stop-loss rule.

Aroon was developed by Tushar Chande in 1995 to identify trend strength and direction.

The Aroon indicator consists of two separate lines:

  1. Aroon-Up: Measures the strength of the uptrend.
  2. Aroon-Down: Measures the strength of the downtrend.

It is based on the number of periods since the highest high and the lowest low over a predefined period, commonly 25 days.

Aroon-Up = ((n - Days Since n-day High) / n) x 100
Aroon-Down = ((n - Days Since n-day Low) / n) x 100

Aroon-Up and Aroon-Down are percentage indicators that measure how recently the n-day high or low occurred. QuantMage also provides the Aroon Oscillator, which is calculated by subtracting Aroon-Down from Aroon-Up. The oscillator ranges from -100 to 100, with zero as the centerline. Positive values indicate an upward trend, while negative values suggest a downward trend. These are the only indicators on this page that use daily high and low prices instead of daily close prices.

The MACD (Moving Average Convergence Divergence) histogram is a momentum indicator based on the relationship between two exponential moving averages.

  1. MACD Line: Calculated by subtracting a 26-day Exponential Moving Average (EMA) from a 12-day EMA.
  2. Signal Line: A 9-day EMA of the MACD line.
  3. MACD Histogram: Represents the difference between the MACD line and the signal line.
  • Above Zero: When the histogram is above the zero line, it indicates that the MACD line is above the signal line, which can be a bullish sign.
  • Below Zero: When the histogram is below the zero line, it suggests that the MACD line is below the signal line, which can be a bearish sign.

As with other technical indicators, MACD is best used alongside other tools and methods.

The Percentage Price Oscillator (PPO) is a momentum indicator that expresses the difference between two moving averages as a percentage. Like MACD, it is based on moving-average divergence, but it is normalized by price level, which makes cross-security comparisons easier.

  1. PPO Line: Represents the difference between a 12-day EMA and a 26-day EMA, expressed as a percentage:
    (12-day EMA - 26-day EMA) / 26-day EMA x 100
  2. Signal Line: A moving average (typically a 9-day EMA) of the PPO line.
  3. PPO Histogram: Represents the difference between the PPO line and the signal line.

The indicator outputs histogram values. Positive values indicate bullish momentum, while negative values indicate bearish momentum.

The PPO histogram provides a normalized measure of the difference between two moving averages, allowing easier comparisons across different securities or timeframes.

Trend Clarity measures how pronounced a trend is by calculating the R-squared value, or coefficient of determination, of a simple linear regression on price data.

  • 100% Clarity means the price data forms a perfect line, indicating a very clear trend.
  • The farther each price point deviates from the approximate (i.e. regressed) line, the lower the Trend Clarity score gets.
  • 0% suggests that the line is no better in approximating the data than simply using the average price for the period.

This metric helps you gauge trend strength and assess whether the move is likely to continue or revert. For more detail, see this article.

This is the asset’s current price. It is often compared with moving averages to identify trends.


These indicators provide the core inputs for many QuantMage strategies and conditions.

For those eager to delve deeper into the world of technical indicators, here are some resources: