Volatility regime score
A 0 to 1 volatility score: 0.5 is neutral, and on one-minute SPY it usually reads low, near 0.3.
VolatilityRegimeScore rates current volatility from 0 to 1, starting from a neutral 0.5. It adds or subtracts fixed steps for four tests: ATR as a share of the close against a target band, the last five ATR readings against the 15 before them, where the current ATR share sits within the lookback, and current volume against its average. The result is clamped to 0 to 1. The bands suit a more volatile symbol, so on one-minute SPY bars the ATR-share test mostly subtracts and the score sits low.
How to read it
- The score sits in its own pane below the price, between 0 and 1.
- A median near 0.3 is the usual reading: the 0.5 base less the 0.2 penalty for an ATR share under 1.5%, with the other tests neutral.
- Readings of 0.5 or more need at least one of the other tests to fire. Above 0.5 is rare on SPY one-minute bars.
- Read the moves, not the level. A rise toward 0.5 or 0.7 means the last five ATR readings average over 10% above the prior fifteen, or volume is over 1.3 times its average.
What it outputs
- Volatility regime score
- Volatility score from 0 to 1, starting at 0.5 and adjusted by four tests: ATR share of price, its recent trend, its rank in the lookback, and volume against average.
Settings
- atr_window
- Bars for both the ATR and the average volume (default 14). Raising it smooths the ATR share and volume ratio, so the score moves more slowly. Lowering it reacts within minutes and makes the line jumpier.
- lookback
- How many ATR readings the percentile and trend tests use (default 50). Longer judges current volatility against a wider past range; shorter adapts faster. Below 10 the indicator never outputs a value.
Pitfalls
- The bands assume ATR of 1.5% to 4.5% of price. One-minute SPY bars sit below that, so the too-low penalty applies on most bars and the documented 1.0 is not reached on defaults.
- Values are sums of fixed steps (0.1, 0.15 or 0.2), so the line jumps between levels rather than moving smoothly.
- Only the first bars have no value (0.17% of the sample). A lookback below 10 never produces one, because the indicator needs 10 ATR readings.