Stock-to-flow model and beyond ~Bitcoin marketcap and price top~
In the previous article, we reproduced PlanB’s stock-to-flow model for Bitcoin and applied the same simple regression technique for Bitcoin & Litecoin. We didn’t observe a strong relationship between ln(marketcap) and ln(s2f) for Litecoin as a result. We deemed S2F(stock-to-flow) as one of the key driving factor for marketcap and price from the outputs but concluded that there would be more space to improve the regression model toward multinomial or multiple regression with multiple explanatory variables or by using more sophisticated approaches in machine learning technique. [1]
In here, I’d like to tweak that simple regression model to do a curve fitting instead of a straight line and predict the maximum marketcap of Bitcoin. I’ll explain why we adopt a curve fitting later. In the future experiment, we will see correlations of assumed explanatory variables from coin metrics not only S2F ratio but also pick other variables to model a marketcap (and price). These consecutive experiments rely on Python, Anaconda3, Jupyter notebook and scikit-learn heavily. Please check out the github repository how the previous model was implemented in advance. [2]
In this article I concluded that the maxium marketcap of Bitcoin is 12.8 trillion USD and the maximum price per Bitcoin is around 610k USD.
Disclaimer
This article is not either an investment advice or a recommendation or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. It should not be relied upon for accounting, legal or tax advice or investment recommendations. The contents reflected herein are subject to change without being updated. This is just for informational and entertaining purpose only.
Pantera Capital, a hedge fund that specializes in cryptocurrencies, predicted in April 2020 that bitcoin could rise to $115,000 by August this year, by using this model. Off course as you already know, BTC price came back around $60,000 but the price hasn’t skyrocketed to $115,000 level. Why? First of all, S2F model focuses on supply side asset scarcity and regression technique was applied to predict the future price. If there is no demand and buying power, supply means nothing. “Why do you want to buy a bottle of water if you’re not thirsty?”
I also saw a defect in the S2F linear regression model. With the halving mechanism or depleting nature in a few crypto currencies, their inflation rates will be simply decreasing. This means obviously that S2F value would be converged to infinite at some point. Why? Because when flow is getting convergent to zero SF = stock / flow will converge to infinite, won’t it? If you’re not familier to this math, there’s a clear explanation in this link. y = 1 / x converges to infinite when x approaches to zero.
But why does it matter? It is my opinion, it is just against my intuition. Marketcap shouldn’t be going to infinite with the increase of S2F ratio. When we get a quite low inflation rate of Bitcoin (maybe late in 20xx possibly?) Bitcoin S2F would be a large number beyond our comprehension. For example, look at the live chart of S2F model in Buy Bitcoin Worldwide below. Even in 2026 Bitcoin’s S2F hit 1,251. I think this is a ridiculous number, isn’t it? Please compare S2F values of commodities to this large number.
From the fact that S2F model has been showing the divergence for Bitcoin plus the mentioned suspicion above, these elements led me to consider a quadratic formula instead of a linear formula to use a linear regression. Look at the scatter plot from the previous article below. I thought a curve fitting would suit the two bottom figures that are relationships between ln(marketcap) or ln(price) and ln(s2f). I’m not sure if you agree with me at this point or not, but let’s try to apply polynomial with degree 2 for Bitcoin data points that we used in the previous article and see what changes.
The result is better than a monomial linear regression with a single explanatory variable x. The R2 score is about 0.942 and the previous one was about 0.929. RMSE value is much less than before. The slope: [ 4.88866069 -0.34410739] and the intercept: 12.823011544354943 are new values because we applied 2 degree polynomial feature for data. In the left figure below, you can see a parabolic arch for the relation between ln(marketcap) and ln(s2f), which looks fine. Under this formula, there is no chance the marketcap goes infinite even if flow is getting close to zero. There must be a limit value.
RMSE value: 0.7885547671768061
R2 score: 0.9420852514169283
Slope: [ 4.88866069 -0.34410739], Intercept: 12.823011544354943
F-statistic: [1742.51558568 603.35556066], P-value: [2.68246322e-78 2.86127359e-51]
Cool. There should be a top of this parabolic arch and those are the points where the highest marketcap and the highest price reside. How can we calculate that? Let’s remember high-school math when we were young. It can be solved by finding f’(x) = 0. This is the place of top of the parabolic arch. Now we’ve got the regression formula ln(marketcap) = 4.88866069*ln(s2f) -0.34410739*ln(s2f)² +12.823011544354943 therefore ln’(marketcap) = 4.88866069 -0.68821478*ln(s2f). Yep then put zero for ln’(marketcap). ln(s2f) = 7.103393928854594. It’s party time now. We can give the calculated ln(s2f) in the model to predict the maximum marketcap for Bitcoin. 12.8 trillion USD is the top of marketcap in this formula.
# Predict the maximum marketcap for Bitcoin in theory
import math
lncap_pred_2d_max = clf_reg5.predict(poly2d.fit_transform(np.array([7.103393928854594]).reshape(-1, 1)))
print(math.exp(lncap_pred_2d_max))
12871706837897.213
Next let’s do the same for the maximum price. In the same way, we’ve got the formula for ln(price). ln(price) = 4.12114332*ln(s2f) -0.25017018*ln(s2f)² -2.3420495638245775 therefore ln’(price) = 4.12114332 -0.50034036*ln(s2f). ln(s2f) = 8.23667976734877 is for S2F ratio. I gave this value 8.23667976734877 in the latter model to predict the maximum price. It is about 225k USD per Bitcoin. You may already notice that this collapses itself. Why? If a Bitcoin hit 225k USD the total marketcap should be 225,000*21,000,000 = 4,725,000,000,000. It is just 4 trillion USD. In this context, I reckon with the relation between ln(marketcap) and ln(s2f) back to basics the meaning of stock-to-flow ratio.
# Predict the maximum price for Bitcoin in theory
import math
lnprice_pred_2d_max = clf_reg6.predict(poly2d.fit_transform(np.array([8.23667976734877]).reshape(-1, 1)))
print(math.exp(lnprice_pred_2d_max))
2258518.401289206
So how much should a Bitcoin be? 12.8 trillion divided by 21,000,000 equals to 609,523. So let’s say the target maximum price per Bitcoin is roughly 610k USD in this relation. I hope this can give a clue for your portfolio management and trading to some degree. Again this article is written for only informational and entertaining purpose. Please remember some assuptions we talked about and this is just a prediction from past data. Also the used data points might not be so accurate because of API quality and the calculation for flow and S2F ratio from supply data. Some data points might have misled the relation in the model wrongly and it could change the model drastically.
stock-to-flow (S2F) model is just the angle from supply side and does not consider demand side. S2F has been used for commodities and natural resources historically for scarce assets with limited supply and stock and flow ratio is considered the factor of marketcap driving force. We started from PlanB’s prediction adopting S2F model for Bitcoin and improved that monomial linear regression with polynomial 2 degree regression in this article. There is a single explanatory variable involved but you can also do your experiment by introducing other variables. For example, total marketcap of all crypto currencies is a good start.
This sounds realistic for Bitcoin, doesn’t it? Now let’s try Litcoin in the same manner. From the previous experiment, we’ve already known that fitting of a straight line did not work well for Litecoin because data points were widely scattered but I think this polynomial approach can improve the model a little bit. Actually we will need to do more experiment to find a general model for crypto, which is a subject to the next research myself. I’ll keep posting in the publication. Let’s see a result for Litecoin below.
RMSE value: 1.276074289131451
R2 score: 0.6321432338250261
Slope: [0.949971 0.19375913], Intercept: 17.54290185046642
F-statistic: [169.42702697 167.51519204], P-value: [2.49723157e-23 3.58060760e-23]
Mhh… it’s not working well. The parameter on ln(price)² is positive, meaning this is a reverse parabolic arch from what we’ve seen in Bitcoin case. When the halving happens in Litecoin, the price movement was lagging that have caused lower marketcap and price in data points. I think that scarce type of assets will follow a similar parabolic arch in longer term if we’ve got more data points. I could obtain Litecoin data points from 2013 April only in this experiment. Let’s study Litecoin in the future again.
I’ll look through more possible variables in the next article and try to apply more sophisticated algorithm in scikit-learn library. As long as we’re seeing, only Bitcoin seems to conform to this S2F driven approach (or other crypto may follow Bitcoin in longer term). This was a good match under the hood. But my aim is to build a general model that can suit other crypto also (especially the ones have similarities with Bitcoin, the finite supply, halving or decreasing inflation, similar characteristics to some extent).
The jupyter notebook used in this article is uploaded in github.
References
- [1] Stock-to-flow model for BTC & LTC. Is LTC silver in crypto?
- [2] yuyasugano/stock-to-flow-model