Signed Realized Variance Trend [BackQuant]

More exclusive indicators from BackQuant
Subscribe to Trading & Portfolio Toolkit for $69.99/month to get exclusive indicators by this author. You pay right on TradingView and can use them on your charts straight away.
Explore Trading & Portfolio ToolkitSigned Realized Variance Trend [BackQuant]
Overview
Signed Realized Variance Trend is a momentum-style oscillator built from squared log returns.
Instead of treating all squared returns identically, the script preserves the sign of each return before smoothing. Positive-return variance contributes positively, while negative-return variance contributes negatively.
The signed component is then divided by total squared-return variance, producing a normalized oscillator bounded between -1 and +1.
In simple terms:
The indicator also includes optional smoothing, a signal line, persistent trend thresholds, static reference zones and candle colouring.
Returns
The calculation begins with one-bar log returns:
The squared return is then:
Squaring makes larger price changes contribute more strongly than smaller ones regardless of direction.
Signed Squared Returns
Direction is reintroduced by multiplying squared return by the sign of the original return:
This produces:
A large move therefore contributes more strongly than a small move because its return is squared.
Signed and Total Energy
The script smooths two series over the selected Energy Length.
Signed Energy
Smoothed signed squared returns.
Total Energy
Smoothed squared returns without direction.
The selected smoothing method can be either:
Both series use the same smoothing method and length.
Signed Variance Ratio
The core oscillator is:
The result is constrained between -1 and +1.
Because the numerator keeps return direction while the denominator contains total squared-return magnitude, the ratio shows which side has contributed more of the recent squared-return activity.
Interpreting the Ratio
Near +1
Most of the smoothed squared-return contribution has come from positive returns.
Near -1
Most has come from negative returns.
Near 0
Positive and negative squared-return contributions are more balanced.
For example, several small positive bars do not necessarily outweigh one large negative bar. Because returns are squared, the larger move may contribute more to the oscillator.
The indicator therefore measures the directional balance of squared returns, not simply the percentage of bullish versus bearish candles.
Energy Length
Energy Length controls how long positive and negative squared-return contributions remain influential.
Shorter values:
Longer values:
Energy Smoothing
EMA
Places greater emphasis on more recent squared returns.
RMA
Produces a slower recursive average for the same nominal length.
This changes how quickly recent large moves affect the ratio.
Trend Smoothing
After the raw ratio is calculated, an optional EMA can be applied.
A value of 1 disables this stage.
Higher values smooth the final oscillator further.
The unsmoothed ratio remains available in the Data Window.
Persistent Trend State
The indicator maintains a separate bullish or bearish state from the oscillator itself.
On initialization:
After initialization, the state changes only when the oscillator clears the opposite Trend Threshold.
A bullish transition requires:
A bearish transition requires:
Values between the two thresholds retain the previous state.
Trend Threshold
The threshold creates a buffer around zero.
For example, with a threshold of 0.10:
Higher thresholds create more persistent states.
Lower thresholds allow faster changes.
Signal Line
The optional Signal line is an EMA of the final Signed Variance Trend.
Its length is controlled by Signal Length.
It provides a smoother reference for the oscillator but does not affect:
Strong and Extreme Levels
Strong Trend Level and Extreme Level provide visual reference zones for larger oscillator magnitudes.
These levels do not alter the underlying calculation or trend logic.
With the default settings:
These are configurable display thresholds, not probability or confidence levels.
Oscillator Colours
Positive readings use progressively stronger bullish colours as magnitude increases.
Negative readings use progressively stronger bearish colours.
Readings at or beyond the selected Extreme Level are displayed in white.
This colouring is visual only.
Trend Candles
Optional chart candles use the persistent trend state:
The colour therefore reflects the oscillator regime rather than whether each individual candle closed higher or lower.
How to Read It
Rising positive oscillator
Positive returns are contributing an increasing share of recent squared-return activity.
Falling positive oscillator
Positive-return dominance is weakening, although the trend state may remain bullish until the bearish threshold is crossed.
Falling negative oscillator
Negative returns are contributing a larger share of recent squared-return activity.
Oscillator near zero
Neither positive nor negative squared-return contribution is clearly dominant.
Large absolute reading
Recent squared-return activity has been concentrated more strongly on one side.
This does not necessarily mean price is overbought, oversold or likely to reverse.
Input Guide
Energy Length
Smoothing period for signed and total squared returns.
Energy Smoothing
Selects EMA or RMA averaging.
Trend Smoothing
Optional EMA applied to the final ratio.
Trend Threshold
Controls how far the oscillator must cross zero before the persistent trend state reverses.
Strong Trend Level
Visual reference level for relatively large oscillator readings.
Extreme Level
Higher-magnitude visual reference level.
Signal Length
EMA length of the displayed signal line.
Data Window
The script exposes:
Limitations
Alerts
The indicator includes:
Summary
Signed Realized Variance Trend separates recent squared log returns by direction.
Positive returns contribute positive squared-return energy, while negative returns contribute negative energy. The smoothed signed contribution is divided by the smoothed total squared-return contribution to create a normalized oscillator between -1 and +1.
The result shows whether recent squared-return activity has been weighted more heavily toward positive or negative moves.
Optional smoothing and separate positive/negative thresholds are then used to create a persistent bullish or bearish trend state.
Overview
Signed Realized Variance Trend is a momentum-style oscillator built from squared log returns.
Instead of treating all squared returns identically, the script preserves the sign of each return before smoothing. Positive-return variance contributes positively, while negative-return variance contributes negatively.
The signed component is then divided by total squared-return variance, producing a normalized oscillator bounded between -1 and +1.
In simple terms:
- Positive values mean positive returns are contributing more of the recent squared-return movement.
- Negative values mean negative returns are contributing more.
- Values near zero indicate a more balanced mix.
The indicator also includes optional smoothing, a signal line, persistent trend thresholds, static reference zones and candle colouring.
Returns
The calculation begins with one-bar log returns:
- Log Return = log(Source / Previous Source)
The squared return is then:
- Squared Return = Log Return²
Squaring makes larger price changes contribute more strongly than smaller ones regardless of direction.
Signed Squared Returns
Direction is reintroduced by multiplying squared return by the sign of the original return:
- Signed Squared Return = sign(Log Return) × Log Return²
This produces:
- Positive values for positive returns.
- Negative values for negative returns.
- Zero for no return.
A large move therefore contributes more strongly than a small move because its return is squared.
Signed and Total Energy
The script smooths two series over the selected Energy Length.
Signed Energy
Smoothed signed squared returns.
Total Energy
Smoothed squared returns without direction.
The selected smoothing method can be either:
- EMA.
- RMA.
Both series use the same smoothing method and length.
Signed Variance Ratio
The core oscillator is:
- Signed Ratio = Signed Energy / Total Energy
The result is constrained between -1 and +1.
Because the numerator keeps return direction while the denominator contains total squared-return magnitude, the ratio shows which side has contributed more of the recent squared-return activity.
Interpreting the Ratio
Near +1
Most of the smoothed squared-return contribution has come from positive returns.
Near -1
Most has come from negative returns.
Near 0
Positive and negative squared-return contributions are more balanced.
For example, several small positive bars do not necessarily outweigh one large negative bar. Because returns are squared, the larger move may contribute more to the oscillator.
The indicator therefore measures the directional balance of squared returns, not simply the percentage of bullish versus bearish candles.
Energy Length
Energy Length controls how long positive and negative squared-return contributions remain influential.
Shorter values:
- Respond faster to recent moves.
- Produce a more reactive oscillator.
Longer values:
- Average activity across a broader window.
- Produce a more persistent reading.
Energy Smoothing
EMA
Places greater emphasis on more recent squared returns.
RMA
Produces a slower recursive average for the same nominal length.
This changes how quickly recent large moves affect the ratio.
Trend Smoothing
After the raw ratio is calculated, an optional EMA can be applied.
A value of 1 disables this stage.
Higher values smooth the final oscillator further.
The unsmoothed ratio remains available in the Data Window.
Persistent Trend State
The indicator maintains a separate bullish or bearish state from the oscillator itself.
On initialization:
- Ratio >= 0 = bullish.
- Ratio < 0 = bearish.
After initialization, the state changes only when the oscillator clears the opposite Trend Threshold.
A bullish transition requires:
- Oscillator > +Trend Threshold
A bearish transition requires:
- Oscillator < -Trend Threshold
Values between the two thresholds retain the previous state.
Trend Threshold
The threshold creates a buffer around zero.
For example, with a threshold of 0.10:
- Above +0.10 can establish bullish state.
- Below -0.10 can establish bearish state.
- Between -0.10 and +0.10, the existing trend state remains unchanged.
Higher thresholds create more persistent states.
Lower thresholds allow faster changes.
Signal Line
The optional Signal line is an EMA of the final Signed Variance Trend.
Its length is controlled by Signal Length.
It provides a smoother reference for the oscillator but does not affect:
- Trend-state transitions.
- Candle colouring.
- Alerts.
Strong and Extreme Levels
Strong Trend Level and Extreme Level provide visual reference zones for larger oscillator magnitudes.
These levels do not alter the underlying calculation or trend logic.
With the default settings:
- ±0.65 marks the beginning of the highlighted strong zone.
- ±0.85 marks the extreme reference.
These are configurable display thresholds, not probability or confidence levels.
Oscillator Colours
Positive readings use progressively stronger bullish colours as magnitude increases.
Negative readings use progressively stronger bearish colours.
Readings at or beyond the selected Extreme Level are displayed in white.
This colouring is visual only.
Trend Candles
Optional chart candles use the persistent trend state:
- Bullish state = selected Bullish colour.
- Bearish state = selected Bearish colour.
The colour therefore reflects the oscillator regime rather than whether each individual candle closed higher or lower.
How to Read It
Rising positive oscillator
Positive returns are contributing an increasing share of recent squared-return activity.
Falling positive oscillator
Positive-return dominance is weakening, although the trend state may remain bullish until the bearish threshold is crossed.
Falling negative oscillator
Negative returns are contributing a larger share of recent squared-return activity.
Oscillator near zero
Neither positive nor negative squared-return contribution is clearly dominant.
Large absolute reading
Recent squared-return activity has been concentrated more strongly on one side.
This does not necessarily mean price is overbought, oversold or likely to reverse.
Input Guide
Energy Length
Smoothing period for signed and total squared returns.
Energy Smoothing
Selects EMA or RMA averaging.
Trend Smoothing
Optional EMA applied to the final ratio.
Trend Threshold
Controls how far the oscillator must cross zero before the persistent trend state reverses.
Strong Trend Level
Visual reference level for relatively large oscillator readings.
Extreme Level
Higher-magnitude visual reference level.
Signal Length
EMA length of the displayed signal line.
Data Window
The script exposes:
- Log Return.
- Squared Return.
- Signed Realized Variance.
- Total Realized Variance.
- Raw Signed Variance Ratio.
- Smoothed Signed Variance Trend.
Limitations
- The indicator is based entirely on current and historical returns.
- It does not forecast future price direction.
- Squared returns give disproportionately more influence to large moves.
- A single large return can materially affect shorter Energy Length settings.
- The ratio measures directional contribution to squared-return activity, not conventional trend strength in every sense.
- Strong and Extreme levels are user-defined visual references rather than statistical confidence thresholds.
- Additional smoothing and larger Trend Thresholds increase persistence but can delay state changes.
Alerts
The indicator includes:
- Signed RV Bullish: persistent state changes from bearish to bullish.
- Signed RV Bearish: persistent state changes from bullish to bearish.
Summary
Signed Realized Variance Trend separates recent squared log returns by direction.
Positive returns contribute positive squared-return energy, while negative returns contribute negative energy. The smoothed signed contribution is divided by the smoothed total squared-return contribution to create a normalized oscillator between -1 and +1.
The result shows whether recent squared-return activity has been weighted more heavily toward positive or negative moves.
Optional smoothing and separate positive/negative thresholds are then used to create a persistent bullish or bearish trend state.
Join the Paid Space or get access to my invite only scripts at
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Join the Paid Space or get access to my invite only scripts at
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
backquant.com/
Or join the free discord discord.gg/RmVrJV67yE
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.