In my research on the Bitcoin rainbow chart, I have seen 4 variants of the Bitcoin Rainbow chart on the Internet.
- The original one by
azop - The dynamic one by
Rohmeo
Both the above are on this page
- This one on Github with Python code
- This one on Reddit
I have a query regarding item 2. This is mentioned on the page corresponding to items 1 and 2:
It achieves a 94.3% fit strength (R²) and dynamically highlights cycle extremes (peaks and bottoms) based on a 180-day window, providing a truly data-driven, self-updating model for the long-term trend.
What exactly is the recipe for the above ? Can someone describe in words what we have to do ?
For comparison:
Item 3 fits a non-linear regression to the entire dataset and then, with an arbitrarily chosen bandwidth/number of bands builds parallel bands.
item 4, has a completely different recipe. Out there, we fit a line to the highs, fit another one to the lows and interpolate to create the bands.













