# 5.7.2 The Price Model

The token price model we have developed is essentially a stochastic differential equation model based on **Geometric Brownian Motion (GBM)**. It integrates elements of supply and demand, as well as a yield curve derived from the Nelson-Siegel-Svensson model, to predict the token price ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FLs3ztXvYqEHsBWK5MGiC%2Fimage.png?alt=media\&token=bd7fbc27-c0b1-4f77-a1db-3ed145674a3f)over time.

This approach allows for the consideration of multiple variables affecting the price:

* **Supply and Demand**: The model considers the cumulative supply of tokens (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FZMRalMNonoRdYzwNQhcM%2Fimage.png?alt=media\&token=b58cf2cd-980f-4c7a-847a-15fa35eaf96e)) and the total demand for tokens (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FpVbJJgInsO2Oj0OgVy37%2Fimage.png?alt=media\&token=a6cf3336-719a-4ed1-bcbf-f013793a315b)). The difference between these two factors impacts the mean return (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FwjuLpL14KIXHL44eZUeZ%2Fimage.png?alt=media\&token=b3c412e2-020b-4bd8-b3f7-4c570049ead7)) of the token price.
* **Entropy**: The model also factors in entropy, which represents the randomness or uncertainty in the system. Higher entropy accelerates the token price growth rate, while lower entropy slows it down.
* **Yield Curve**: The yield curve (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FP0wSwUKBleg1OYKPI8eV%2Fimage.png?alt=media\&token=80954b06-98a0-4317-89ab-b61708ed2ecd)), derived from the Nelson-Siegel-Svensson model, represents interest rates over time and is used to simulate the volatility of the token price.
* **Viscosity Factor**: As the price approaches an upper limit, a viscosity factor is applied to slow down the growth and prevent the price from exceeding this limit.
* **Random Fluctuations**: Random fluctuations in price are accounted for by incorporating a stochastic term ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FTLCb630jRwk85tD3q6if%2Fimage.png?alt=media\&token=a085d274-cc86-4421-b8a2-a2ec6ac397c6), following a normal distribution.

The model algorithm:

* **Initialization**:

  o     Token price ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FLs3ztXvYqEHsBWK5MGiC%2Fimage.png?alt=media\&token=bd7fbc27-c0b1-4f77-a1db-3ed145674a3f) is initialized to ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2F0P1UFYqMiESCWEsLol74%2Fimage.png?alt=media\&token=1c4c599a-5a43-4357-ae03-1cc29b955bc4) which is the minimum token price limit.

  o      ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FTLCb630jRwk85tD3q6if%2Fimage.png?alt=media\&token=a085d274-cc86-4421-b8a2-a2ec6ac397c6) is initialized with random normal values scaled by sqrt(dt) (square root of time step).
* **Iteration over time**: The model iterates over time from the second time step to the end (since the first time step was used for initialization).

  o     Growth Rate![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FwjuLpL14KIXHL44eZUeZ%2Fimage.png?alt=media\&token=b3c412e2-020b-4bd8-b3f7-4c570049ead7)calculation:  ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FgJFYFkOOpUxrKB6vXOyg%2Fimage.png?alt=media\&token=9cb63d21-c1d2-4e15-be70-bcd2ed7a63ce), the growth rate of token price, is calculated for each time step. It is determined by the entropy of the system and the difference between total demand for tokens and cumulative supply of tokens. The entropy reflects the unpredictability of the system, while the demand-supply difference reflects the scarcity or abundance of tokens in the system. A scaling factor (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FKT6wqIinsbZqkN0OtEwf%2Fimage.png?alt=media\&token=3615d2db-8ee2-4c3e-a260-42a617121c47)) is used to adjust the effect of entropy.

  o     Volatility (![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FP0wSwUKBleg1OYKPI8eV%2Fimage.png?alt=media\&token=80954b06-98a0-4317-89ab-b61708ed2ecd)) calculation: ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FeGsfgAc9dgRlDL7uVHWn%2Fimage.png?alt=media\&token=2e58e05a-afd9-41d6-abc0-be5197700334), the volatility of token price, is calculated for each time step. It is determined by the yield curve and scaled by a factor ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FGquu9bXrMW2HlNtnwYRL%2Fimage.png?alt=media\&token=74a36466-cf28-485b-81d5-ecf3f6e02a45) to adjust the level of price fluctuations.

  o       Token Price Change Calculation: The change in token price ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FN4LWFzwEb20pVgQzIT4m%2Fimage.png?alt=media\&token=b088c622-8c02-4b63-a165-3e24b5e1cd06) for each time step is calculated using a formula similar to geometric Brownian motion, which includes the growth rate, volatility, and a random factor ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FTLCb630jRwk85tD3q6if%2Fimage.png?alt=media\&token=a085d274-cc86-4421-b8a2-a2ec6ac397c6).
* **Viscosity Effect**: If the token price exceeds a certain threshold close to the maximum limit ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FbNXOSGihvR1BVeYgC3hI%2Fimage.png?alt=media\&token=b31cfaa3-eb7d-4f92-96e6-f625b9ad5311), a viscosity factor is applied to slow down the price growth.
* **Token Price Adjustment**: After calculating the new token price, it is adjusted to ensure it stays within the predefined minimum and maximum limits ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FiCgDgwasj5SjDaWttdWE%2Fimage.png?alt=media\&token=5cfdc639-f527-431e-b266-928c170f8063) and ![](https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2Fc9TMYrt61K9jOYzZrtmF%2Fimage.png?alt=media\&token=36ff2985-da62-445e-a0ce-018b7af490a2).

<figure><img src="https://3210145376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSvanFNAf6Jf8kwvqcdRQ%2Fuploads%2FzOAqwsdXy6DhPReEh512%2Fimage_2023-11-14_180603229.png?alt=media&#x26;token=3b78f741-038d-4197-b10a-ac496759fc64" alt=""><figcaption><p><em>Figure 92 Token Price over time</em></p></figcaption></figure>
