📜 ⬆️ ⬇️

Bitcoin farhulst

Bitcoin and other cryptocurrencies have captured the attention of a huge number of people. Why not take this chance to popularize mathematics and, in particular, Mathcad? In this article, we will look at several simple well-known models based on differential equations, namely, a family of logistic models (unlimited growth, with competition for a resource, with fishing and delay). For the first time, the Belgian mathematician Verhulst proposed the system factor limiting the growth of the biological population; therefore, the corresponding model (it will be considered the second one) rightfully bears his name.

Since everything that is happening lately with Bitcoin seems to be a pyramid, then the models will be appropriate, especially since, thanks to MMM, many colleagues, for example, M. Balandin and V. , have already devoted their articles to the mathematical apparatus . Points . As before, we will focus on the methods of calculations in Mathcad, in particular, in its free version of Mathcad Express , without insisting on the accuracy of the forecast, what will be the bitcoin rate in the near future, and when exactly it will collapse.



First of all, it is worth noting that so far, over the past few months, the chart of the Bitcoin exchange rate strongly resembled exponential growth (see the chart above). Those. This suggests the use of an equation of the type y '(t) = S * y (t), the solution of which is an exponential function. To be able to compare experimental data and simulation results in Mathcad, you must first import the original data into a Mathcad document. How I do this (by the way, the import works in the free version of Mathcad Express) I dedicated a screencast , in which I also showed how to interpolate and extrapolate data using an exponential function. The result of interpolation-extrapolation is shown in the upper graph of the red (according to the data for the last year) and orange (for 4 months) curves.
')
In this article, we will calculate several simple well-known models, based on ordinary differential equations . They were initially proposed as models of the growth of biological populations (for more details, see, for example, here ), and later were used to model epidemics, as well as economic phenomena similar to the one under consideration. The first model is y '(t) = S * y (t), where y (t) - we consider the bitcoin rate at time t. This world-famous model was proposed by Malthus in 1798 in his classic work “On the law of population growth”. If we draw an analogy with the dynamics of the population, or rather, with the spread of the epidemic, then it would be more adequate to consider y (t) the total capitalization of Bitcoin, i.e. the value of the current course, multiplied by the number of bitcoins. But since the number of bitcoins has changed little over the year (and it has increased due to mining), for simplicity and clarity, y (t) can be considered the current rate.

We now turn to the following model - the Ferhulst equation y '= S * y - k * y 2 , in which the last term describes the attenuation of the epidemic due to resource limitations. Accordingly, let's look at this example as in the mathcad prime and mathcad express, you can solve ordinary differential equations (hereinafter ODE). In the full-featured version of mathcad prime, this uses the “solution block”, in which, in fact, the initial condition is written, the differential equation itself (highlighted by a yellow fill), and the built-in mathcad prime function that solves it.



The ODU solution using the built-in function Mathcad Ðrime is shown as a yellow curve. If you have only a free version of Mathcad Express, then the solution of such a simple ODU, such as logistic, is easy to record as an implementation of a difference scheme (a detailed article on Habré is devoted to this). The difference scheme itself contains only two lines of calculations and is written out to the right of the “solution block” circled in the box. The solution of an ODE using a difference scheme is shown on the same graph in the form of a dotted curve, which coincides with the solution y (t). The asymptotic value that y (t) tends to is S / k. Actually, based on these considerations, the coefficient k is chosen. We don’t know what he really is (according to the model, bitcoin can grow up to 25, and maybe up to 200, if you take k 10 times less).

The next model is a slight complication of the logistic, namely, the model of the dynamics of the population subjected to the fishery, uniform withdrawal from the population of its particular share. If we draw an analogy with bitcoin, then this model describes a decrease in the volume of bitcoins due to their sale by speculators (and / or at the expense of a strange commission when exchanging money, reaching, as we know, 10-20%). It is also worth considering that fishing (bitcoin sales) does not start from the very beginning, but from a certain moment, for example, after reaching the equilibrium value S / k. The equation and its solution is as follows:



As you can see, fishing causes a certain decrease in the equilibrium rate (in terms of computational biology, the population size). But this will happen if only a very small percentage of the population is subject to fishing. If the last term in the equation is taken too large (more precisely, it is greater than a certain critical value), then the population, instead of striving for asymptotic numbers, will become extinct (and the Bitcoin course, if we draw an analogy, will collapse to zero). The corresponding solution graph (for the coefficient of the last term is approximately 0.07) is shown in the figure:



Actually, this describes the financial pyramid quite well: first, rapid exponential growth (Malthus model) - then saturation and plateau (Verhulst model or a logistic model with a small business) - and in the final investor dissatisfaction, panic sales and the fall to zero. When will this happen? Of course, I will not undertake to predict - maybe tomorrow, and maybe in a year.

The latter model, which is characteristic of financial modeling and which I would like to consider, is a “logistics model with a delay”. If we want to take into account the presence of speculators who play in a growing market, then the easiest way is to foresee that they buy bitcoin, hold for some time, and then sell. For definiteness, choose this time period to be 120 days. Then the corresponding "logistic equation with delay" will slightly differ from the Verhulst equation y '= S * y - k * y 2 , namely, to include as the last term not the square y (t), but the product of two values ​​y (t) taken at two points in time, 120 days apart. This is also the well-known equation y '(t) = S * y (t) - k * y (t) * y (t-120), which can be solved numerically using the following difference equation in Mathcad Express:



It is noteworthy that the delay equation has a solution in the form of damped oscillations. And it is possible that before the collapse we will see (or maybe even see right now?) Such a characteristic correction of the Bitcoin rate. But still, I don’t want to guess, because, once again, this article is a good reason to show how differential equations are solved in Mathcad and remind the reader about models from computational biology.



In conclusion, I leave a link to my video , in which the entire sequence of actions in Mathcad for calculating the reduced models is described in more detail.

Source: https://habr.com/ru/post/345138/


All Articles