The Valuation indicator computes (close - rolling_mean) / rolling_mean and then ranks the current reading against its own
recent history to produce a percentile. Higher percentile = price is
expensive vs recent history; lower = price is cheap.
Output
Single column named after your indicator (e.g. valuation_pct),
typically a percentile between 0 and 100.
Usage
- Mean reversion: fade
valuation > 90or buyvaluation < 10. - Trend filter: skip long entries when
valuation > 80- the symbol is already stretched. - Reference-symbol bias: build a custom rule that compares this symbol's valuation against another (e.g. BTC vs ZB bond yield) for cross-asset regime signals.
Pitfalls
- Percentile is over the lookback window, not all time. Long trends sit at the high end of the percentile rank for the whole duration and a "fade extremes" rule will bleed.
- Reference symbols (like bonds) need to be present in the
trading_symbolstable with up-to-date candles for the cross-asset version to work.
