Stock to Flow Model with Standard Deviation Bands

This Study takes the Stock to Flow Model for Bitcoin as presented by @100trillionUSD and smoothes it using an SMA . Then it calculates the close's standard deviation from it and displays the 2-Sigma Bands.

The stock to flow model seems to be one of the best predictions of Bitcoins price as shown by the following medium articles.

The standard deviation bands are supposed to show situations in which Bitcoin is significantly over- or under-bought.

Release Notes: Added option to change the standard stock to flow model values.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Hello Xyse, many thanks for this script, it works like a charm (have been using it for months!).
I just have a question: why did you pick the default parameters 0.4 and 3 for the multiplier and exponent respectively?
I had a look at Plan B (@100trillionusd) methodology and wasn't able to find those figures.
Thank you in advance for you reply. Admire your work
+1 Svara
xyse gon1111
@gon1111, Check Plan B's inital post about the model on his Medium (https://medium.com/@100trillionUSD/modeling-bitcoins-value-with-scarcity-91fa0fc03e25). There is this Picture with the Parameters of the Equation. (https://miro.medium.com/max/700/1*YvqgE9q1UBOKT_rPAFH4Ew.png)
@xyse, Awesome, many thanks for the prompt and helpful reply!
Very interesting. If I remember correctly the S2F used a couple of parameters. Like the exponent at which it should be elevated to, and so on. How did you handle that? Would it be possible to have that as a parameter?
+1 Svara
xyse piespe
@piespe, Yeah, its in line 17. I'll make an update so you can adjust the values. Have a nice day! (After the update its line 19)
+1 Svara
@xyse, Thanks!
+1 Svara
Were these bands made to fit the data before 2019 or just happen to be that way?