Inspired by
this discussion I wondered if we could improve the volatility indicator for Bitcoin, such as the value displayed at
Bitbo.io.
The idea is to remove the long term trend from the equation. Why? Because if the long term trend is bullish (like currently) then volatility will always be a bit higher than what you might expect, just because the trend also impacts in the volatility.
What I'm searching for (in the current long term bullish trend) is a formula that gives a volatility of zero if the Bitcoin price moves up exactly as expected by the long term trend. and otherwise gives the "volatility versus the trend".
A good approximation of the current longterm trend would be a longer SMA, e.g. the SMA-1000 (a timeframe of almost three years) or for more "fresh" values the SMA-365 or the SMA-200.
The Bitbo Volatility is calculated in the following way (N being the number of days):
Bitcoin's daily volatility = Bitcoin's standard deviation = √(∑(Bitcoin's opening price – Price at N)^2 /N).
The idea for the
trend-adjusted volatility: √(∑(Bitcoin's opening price – Price at N – (Price at N * SMA daily change)) ^2 /N)
This means: from each daily price change, we subtract the average SMA daily change.
Expected effect:
- If the SMA daily change is positive and the volatility is to the upside, then the trend-adjusted volatility should be lower than the raw volatility.
- If instead the SMA daily change is positive and the volatility mainly is to the downside, then the trend-adjusted volatility should be higher than the raw value.
On paper, the idea sounded good. I modified a Python script based on another one I already had to calculate the volatility. The "raw" (not adjusted) volatility is close to the value at Bitbo, so the main calculation seems correct.
The expected effect was correct. But it seems the "adjustment" makes much less of a difference than I thought.
For example, for the 30-day volatility on May 18 I get the following values with the SMA-365:
- SMA365 daily change: 0.13097 %
- Volatility without trend adjustment: 1.6465 %
- Volatility with trend adjustment: 1.5929 %
For the current value (June 18) I get even less difference:
- SMA365 daily change: 0.13142 %
- Volatility without trend adjustment: 1.4192 %
- Volatility with trend adjustment: 1.4239 %
That looks strange because the adjusted value is even a bit higher than the raw value. However, that can be probably explained: in the selected period, the trend was slightly bearish, i.e. the volatility was mostly to the downside.
Still I'm wondering if my approach is correct.
Thus I'd like to ask: Am I missing something? Is the formula wrong? Or is the long term trend already so smooth that it almost doesn't matter? (Don't really expect much reactions but perhaps there are some math nerds wanting to join me here

).