A fear and greed index for any instrument, at any horizon
How to build a fear and greed score from 0 to 100 for Bitcoin, the S&P 500, gold or a stock, from daily or 5 minute bars, for a short, medium and long horizon.
The CNN index (US stocks) and the alternative.me index (crypto) mix several signs of fear and greed. The same method works for one instrument alone: each sign is ranked against its own history, so every component is a number from 0 to 100, and the index is their average.
Components over a horizon of h bars
Scores and index
- 0 to 25: extreme fear; 25 to 45: fear; 45 to 55: neutral; 55 to 75: greed; 75 to 100: extreme greed
- The signs that mean fear when they are high (volatility, implied volatility, put/call) enter with a minus sign
- Lookback \(L\): 365 days for daily bars, 30 days for 5 minute bars
Horizons
- Daily bars: short 7 days, medium 30 days, long 90 days
- Hourly bars: short 6 hours, medium 1 day, long 1 week
- 5 minute bars: short 1 hour (12 bars), medium 1 day (288 bars), long 1 week (2,016 bars)
- Implied volatility: Deribit DVOL; for the S&P 500 the VIX, the Nasdaq 100 the VXN, gold the GVZ, oil the OVX
Short and long horizons often disagree: a short fear inside a long greed is a pullback in an up trend; a short greed inside a long fear is a rebound in a down trend. The extremes are contrarian signs: extreme fear has often come near lows, extreme greed near highs.
In R: fear_greed_get("BTC-USD", "1d") or "5m", then fear_greed_chart(); data/make_fear_greed.R saves Bitcoin, Ether, S&P 500, Nasdaq 100, gold and oil.