Modeling a Speculative Asset Bubble
The recent dramatic crash of the Luna cryptocurrency, which was being used to back up the UST stable coin, from a high of about $116 just a little over a month ago in April to essentially $0 today has emphasized how risky trading in cryptocurrencies can be.
I have been thinking about how to model the formation and bursting of such speculative bubbles from a mathematical perspective. In the spirit of Hal Varian’s classic advice to keep economic models as simple as possible to gain the most general insights, I came up with a very simple and parsimonious model that I think may have some pedagogical value. I’d like to share it with you.
The model has two key variables: price (or value of the asset in question), and sentiment (a measure of trading preference indicating whether there are more people interested in buying or selling the asset). Let us denote price by the variable y, and sentiment by the variable x. In the following we discuss how we model each of these.
For the purpose of building this model, we assume that there is some finite population of traders, and that each trader can either buy or sell one unit of the asset. Another simplifying assumption we make is that the price of the asset is proportional to the fraction of traders that have bought the asset and we normalize the price so that it varies from a minimum of 0 (corresponding to when there are 0 buyers) to a maximum of 1 (corresponding to when all traders have bought the asset).
We model sentiment as a variable that can go from a minimum of -1 (corresponding to all traders wanting to sell or stay away from buying the asset), to a maximum of +1 (corresponding to maximum possible desire to buy the asset among the population of traders).
We are interested in understanding the formation and bursting of a speculative asset bubble over time. Thus we need a mathematical modeling tool that takes time into account. The model I propose is in the form of a dynamical system consisting of two coupled differential equations in these two key variables (the sentiment x and the price y). Here are the two equations:
The first equation is about the rate of change of price, which as we have noted above is being modeled as the fraction of traders that have bought the asset. This derivative of price with respect to time (dy/dt) is being modeled to be proportional to the sentiment x. This makes sense — You can think of x as representing the “buzz” about the asset; so when x is positive, there is overall interest in buying, and more buying takes place the higher x is. And when x is negative, there is overall interest in selling, and more selling (reduction in price) happens as x becomes more negative.
The first equation also has the terms y and (1-y) — these are used in the model primarily to ensure that the derivative goes to 0 when y=0 or y=1, i.e. to ensure that the price doesn’t exceed these given boundary conditions. You could also ascribe some meaning to these terms as follows. When y is very low, there are few traders that have bought the asset, and that may make other traders more cautious about buying; likewise, when the asset price y is very high, there are very few traders that have yet to buy the asset, and this could slow down the pace at which new purchases of the asset take place. Finally, the variable a is just a tunable parameter of the model.
Now let’s turn to understanding the second equation, which describes how the sentiment itself depends on the price of the asset. The term (b*dy/dt) indicates that the rate at which sentiment grows/decreases is proportional to the rate at which traders buy/sell the asset, which in our model is the rate of price change. The term (-c*y) indicates that when most traders have bought the asset and the price is approaching an all time high, some traders will start to want to sell the asset in order to make a profit (after all, haven’t we all been taught to buy low and sell high?). This in our model would drive a decrease in the sentiment by causing a decrease in the derivative of sentiment with respect to time till it becomes negative. The terms (1-x) and (1+x) are included to ensure that dx/dt goes to zero as x reaches either the lower and upper bounds (-1 and 1, respectively). Again, the variables b and c are tunable parameters.
That’s it. Just these two equations describing the interplay between price and sentiment, together with the three component parameters (a,b,c), are sufficient to model the rise and fall of a speculative asset. This model is illustrated in the plot below, obtained by numerically solving these coupled differential equations (see my Google sheet implementation of the solution).
How does this model work, and what does it tell us? We can observe the figure above to understand what the model implies. Initially, when there are few traders that have bought the asset, but the sentiment is positive, there is a rise in price. Eventually, the rise in price slows down as most traders have bought in and the price is reaching close to the maximum possible, and sentiment starts to decrease. Eventually, as we see, the sentiment turns negative and traders rush to sell, resulting in a decrease in the price. The traders selling results in more negative sentiment, resulting in more traders selling, etc., eventually crashing the price back to 0!
What can we learn from such a simple model? In the world of cryptocurrency trading in recent years, there have been many such speculative bubbles — from scam-like initial coin offerings (ICO’s) and outright Ponzi schemes to perhaps well-intentioned but nonetheless fragile DeFi platforms. The crashes seem to come out of the blue when the price has been increasing and high for a long time. As the primary signal that is visible to all market participants, the price, keeps marching upward and stays high, the platform seems highly attractive and retail traders keep getting pulled in. This is the stage often referred to in the crypto-discourse as FOMO (fear of missing out). This model tells us that this stage may not last.
Eventually, if only because there is a limit to how many traders the platform can attract, or because of the natural process of selling triggered by traders that want to realize profits, or possibly because of the actions of malicious parties that identify suitable arbitrage opportunities, the upward march of price slows down. Then the sentiment changes as fear, uncertainty and doubt (FUD) start to prevail. The price eventually starts to fall. The consequent “death spiral” (fall in price causing more negative sentiment, driving further fall in price and so on) can cause the price to crash down quite sharply, causing grief to thousands of traders who don’t know to or are unable to pull out in time.
Of course, the behavior of the model depends on and is sensitive to the underlying parameter values. For example, if the parameter a is very low, the price of the asset may never rise; or if it is large, it may cause the asset price to both rise up quickly and stay high for a long time before a crash; If the parameter b is too low, there may not be any increase of sustaining of positive sentiments even when the price is rising, while if it is high positive sentiments rise and the price may be sustained at a high point for longer duration; if the parameter c is too low, there may be no price crash at all and if it is high the bubble may be quite short-lived.
Note: I built this model from scratch, inspired in part by the simple SIR differential equation model used for describing epidemics. The model presented here is perhaps more related to predator-prey models such as the Lotka-Volterra system of equations. I’m not sure if a similar model has been proposed/studied before specifically in the context of financial assets, though I would not be surprised if that is the case — would certainly appreciate a pointer if you happen to know of such a model!
I would like to reiterate again that the goal here has been to develop a parsimonious model, intentionally sacrificing realism for simplicity and explainability and hopefully gaining also some generality and insight. One key simplification in the modeling here is that it focuses only on the relationship between price and sentiment (which I believe is a key driver of both the rise and fall associated with speculative bubbles), and doesn’t consider any other exogenous or endogeneous variables that pertain to the utility or earnings of the underlying asset.
More complex models are certainly possible. In particular it may make sense to separate out the dynamics for the two cases when the sentiment is positive and the price rises and when the sentiment is negative and the price crashes. Instead of directly equating number of traders that buy the asset to the price of the asset, some other function that relates the price of the asset to the demand for it may be a better choice. More variables could be introduced to model marketing and information propagation that affect the trading sentiment, potentially even leveraging some kind of graph structured social networks. Instead of a first-order deterministic model, a stochastic approach could be adopted, to account for demand uncertainty at different prices, consequent price fluctuations, and perhaps also heavy-tailed selloff-triggering events.