Modeling Bitcoin Price and Bubbles Modeling Bitcoin Price and Bubbles

The goal of this chapter is to present recent developments about Bitcoin 1 price modeling and related applications. Precisely, we consider a bivariate model in continuous time to describe the behavior of Bitcoin price and of the investors ’ attention on the overall network. The attention index affects Bitcoin price through a suitable dependence on the drift and diffusion coefficients and a possible correlation between the sources of randomness represented by the driving Brownian motions. The model is fitted on historical data of Bitcoin prices, by considering the total trading volume and the Google Search Volume Index as proxies for the attention measure. Moreover, a closed formula is computed for European-style derivatives on Bitcoin. Finally, we discuss two possible extensions of the model. Precisely, we investigate the relation between the correlation parameter and possi- ble bubble effects in the asset price; further, we consider a multivariate framework to represent the special feature of Bitcoin being traded on several exchanges and we discuss conditions to rule out arbitrage opportunities in this setting.


Introduction
Bitcoin is a digital currency built on a peer-to-peer network and on the blockchain, a public ledger where all transactions are recorded and made available to all nodes. Opposite to traditional banking transactions, based on trust for counterparty, Bitcoin relies on cryptography and on a consensus protocol for the network. The entire system is founded on an open source software created in 2009 by a computer scientist known under the pseudonym Satoshi Nakamoto, whose identity is still unknown (see [1]). Hence, Bitcoin is an independent digital 1 We use the following rule throughout the paper: the term BitCoin refers to the whole system network while Bitcoin refers to the digital currency. currency, not subject to the control of central authorities and without inflation; furthermore, transactions in the network are pseudonymous and irreversible.
Bitcoin and the underlying blockchain technology have gained much attention in the last few years. Research on Bitcoin often deals with cybersecurity and legitimacy issues such as the analysis of double spending possibilities and other cyber-threats; recently, high returns and volatility have attracted research toward the analysis of Bitcoin price efficiency as well as its dynamics (see, among others, [2][3][4]). Moreover, many contributions claim that Bitcoin price is driven by attention or sentiment about the Bitcoin system itself; see [5][6][7][8]. Possible driving factors for the sentiment about the Bitcoin system are the volume of Google searches or Wikipedia requests as in [5], or more traditional indicators as the number or volume of transactions, as suggested in [6]. In [9], the author suggests a time series model in order to identify the dynamic relation between speculation activity and price.
In this chapter, after having introduced the basic concepts underlying Bitcoin, we sum up and describe to a broader audience the recent outcomes of the research reported in [10], by avoiding unnecessary technicalities. Some new insights are also given by looking at possible extensions in order to take into account the presence of bubble effects or the special feature of Bitcoin being traded in different online platforms (exchanges) that will be further investigated in our future research.

The Bitcoin network
We recall that Bitcoin was first introduced as an electronic payment system between peers by Satoshi Nakamoto (pseudonym) in [1]. Opposite to traditional transactions, which are based on the trust in financial intermediaries, this system relies on the network, on the fixed rules and on cryptography. Bitcoins can be purchased on appropriate websites that allow to change usual currencies in the cryptocurrency.
The Bitcoin network has several attractive properties for its users: • No central bank authority for money supply and no regulator; • Transactions are 24/7 and without any country border; • Transaction cost are almost negligible with respect to traded amount; • Transaction are anonymous; • The security of each transaction is guaranteed by cryptography and digital signature; • The security of the whole network is guaranteed by construction unless more than 50% of the network nodes agree on a deceptive action.
As a digital payment system, Bitcoins may be used to pay for several online services and goods. Special applications have been designed for smartphones and tablets for transactions in Bitcoins and some ATMs have appeared all over the world (see Coin ATM radar) to change traditional currencies in Bitcoins. Accepting Bitcoins as a payment method is also related to an advertisement opportunity for companies. However, the high returns achieved in the last few years have transformed Bitcoin in a speculative asset affecting its use as a form of payment.
The Bitcoin system has been subject to many cracks but has proven to be very resilient as the value of the cryptocurrency was able to rise again after all the falls. Nevertheless, at the time of writing, Bitcoin was experiencing a fall in its exchange rate with main fiat currencies.
Two of the main crackdowns were China enforcement in December 2013 and Mt. Gox bankruptcy in February 2014.
Besides technical and regulation issues, the Bitcoin system also faces reputational concerns.
In fact, the ambiguity of anonymous transactions has blamed the network of allowing several criminal activities such as buying illegal goods, money laundering or the financing of terrorism actions. As a representative example, we recall that The Silk Road was a website that started selling narcotics and illegal drugs in 2011, payable in Bitcoins. The website was finally shutdown by 2013 and the owner was arrested and sentenced to life in prison. Again, anonymous transactions make it possible to use huge quantities of money, exchanged in Bitcoins, without declaring its origin, hence allowing for possible money laundering. However, according to a research performed by the UK government, the highest score related to money laundering is still cash, followed by the bank, accountancy and legal service providers (see https://www.gov. uk/government/publications/uk-national-risk-assessment-of-money-laundering-and-terroristfinancing).
It is worth noticing that while counterparties are represented by secret addresses and are anonymous, all transactions are recorded and might be traced. Investigation is hence favored by this feature of the network.
Despite the flaws in the system, Bitcoin has achieved a notwithstanding rise in recent years.
In Figure 1, we report Bitcoin price and returns from January 2012 to December 2017 (source https://blockchain.info/en/charts).

An attention-based model
The model we suggest in what follows is motivated by findings in [5,6,8,11] where it is showed that Bitcoin price is related to investors' attention measured by the trading volume and/or the number of searches in engines such as Google and Wikipedia. Bitcoin is treated as a financial stock as suggested in [12] and the suggested model may be applied in principle to other assets that are proven to depend on market attention.

The model specification
Consider a probability space Ω; F ; P ð Þ endowed with a filtration F ¼ F t ; t ≥ 0 f g satisfying usual assumptions of right continuity and completeness.
Let us denote the Bitcoin price process as S ¼ S t ; t ≥ 0 f gand assume that it depends on an attention factor denoted by A ¼ A t ; t ≥ 0 f g . The dynamics of the two processes are described by the following equation: It is well known that the above dynamics for the attention factor is a geometric Brownian motion, the solution of which is given by for t ≥ 0 which has a log-normal distribution; integrating the price process is straightforward to get

Statistical properties and model fitting
We collect in this subsection the properties of the logarithmic returns obtained by the price process defined in Eq. (1).
Consider the discrete process A iΔ ; S iΔ ð Þ ; i ¼ 1; 2; …; n f g obtained by sampling the price process and the attention factor at times t i ¼ iΔ, i ¼ 1, 2, …n with constant observation step Δ; denote the logarithmic changes of the process by Note that R i , i ¼ 1, 2, …n represent the logarithmic returns of asset S for the sampling dates and that X i , i ¼ 1, 2, …n the cumulative attention in the time interval i À 1 ð ÞΔ, iΔ ½ . Then it is straightforward to prove the following: Theorem 2.1. The random vector R ¼ R 1 ; R 2 ; …R n ð Þ , given X ¼ X 1 ; X 2 ; …X n ð Þ , is normally distributed with mean m and covariance matrix Σ where Proof. In order to prove the theorem it suffices to remind that, for i = 1, 2, …, n, the random variable Ð iΔ iÀ1 ð ÞΔ ffiffiffiffiffiffi A u p dW u , conditional on knowing X i , is normally distributed with zero mean and variance X i , and that the increments of the Brownian motion W are independent.
As for the unconditional distribution, it is easy to obtain, for i ¼ 1, 2, …, n, where E X i ½ , Var X i ½ can be computed in closed form as a function of μ A , σ A , Δ (see for example [10]). The above outcomes are applied in order to derive the likelihood of the vector R; X ð Þ. Indeed, by simply applying Bayes' rule, we get the following result: Proposition 2.2. The joint probability density of the vector R; X ð Þis given by g : where f X1 Á ð Þ and f Xi|XiÀ1 Á ð Þ are the probability density function of X 1 and X i given X iÀ1 , respectively.
The proof follows from Bayes' rule and application of Theorem 2.1.
It is worth to remark that the probability density g Á ð Þ in Eq. (5) depends on suitable choices for f X1 Á ð Þ and f Xi|XiÀ1 Á ð Þ. Under our assumptions, such densities are not given within known distribution; however, by applying outcomes in [13], we can approximate them as log-normals with means and variances given as closed expressions of μ A ; σ A À Á .
We apply the outcomes above in order to estimate model parameters according to the maximum-likelihood method (see for example [14,15]) where the likelihood is approximated by applying the Levy approximation [13].
Parameter estimates are obtained as where

Empirical application on Bitcoin prices
The first step in our procedure is to identify possible measures of investors' attention. As already mentioned in the introduction, we consider the total trading volume on Bitcoin available from https://blockchain.info as well as the search volume index (SVI) for Google searches on the topic "bitcoin" provided by https://trends.google.it/trends/.
The trading volume of exchange is a classical measure of the attractiveness of a traded asset for an investor; besides, in [16], the authors find evidence that the latter captures the attention of retail/uniformed investors.
We consider daily data from January 1, 2015, to June 30, 2017, for the total volume and the SVI Index. As for the daily value of the Bitcoin, we have considered the average mean across main exchanges represented by the Index in https://blockchain.info.
In Table 1, the outcomes for parameter estimates, obtained by maximizing the approximate likelihood given the observed time series, are summed up.

A closed formula for Bitcoin option prices
In this section, we show how to characterize the price of European call options on Bitcoins in the underlying market model. Let us fix a finite time horizon T > 0 and assume the existence of a riskless asset (also called the savings account), whose price process B ¼ B t ; t ∈ 0; T ½ f gis given by where r : 0; T ½ !R is a bounded, deterministic function representing the instantaneous riskfree interest rate. To be reasonable, the market model must avoid arbitrage opportunities, that is, investment strategies that do not require an initial investment and that do not expose to any risk and lead to a positive value with positive probability. From a mathematical point of view, this means to check that the set of equivalent martingale measures for the Bitcoin price process S is nonempty. Precisely, it is possible to prove that it contains more than a single element.
Lemma 3.1. Every equivalent martingale measure Q for S is characterized by its density process with respect to the initial probability measure P as follows: The proof can be deduced from that of Lemma 1.4 in [10], where they also account for a possible delay between the attention factor and its effect on Bitcoin prices trend. The process γ can be interpreted as the risk perception associated to the future direction or future possible movements of the Bitcoin market. Since S is the only tradable asset, the risk perception is not fixed and this explains the nonuniqueness of the martingale measure Q in this market framework that turns out to be incomplete. Consequently, given any European-type contingent claim, it is not possible in general to find a self-financing strategy whose terminal value exactly replicates the payoff of the claim. We recall that the notion of completeness is related to the uniqueness of the martingale measure. Indeed, in complete markets, the no-arbitrage price of any derivative is uniquely determined by the unique martingale measure. On the other hand, in incomplete markets, we deal with a family of martingale measures and have at our disposal a set of possible prices, which are all compatible with the "no-arbitrage condition." One common approach to option pricing in incomplete markets in the mathematical financial literature is to select one specific martingale measure (which can be also called pricing measure) under which the discounted traded assets are martingales and to compute option prices via expectation under this measure via risk-neutral evaluation formulas. One simple example of a candidate equivalent martingale measure is the so-called minimal martingale measure (see [17,18]), which minimizes the relative entropy, of the objective measure P, with respect to any risk-neutral measure. In this setting, its economic interpretation is that agents do not wish to be compensated for the risk associated with the fluctuations of the stochastic attention factor, which corresponds to the hypothesis of [19] in the stochastic volatility framework. This is the probability measure which corresponds to the choice γ 0 in Eq. (10). Intuitively, under the minimal martingale measure, say b P, the drift of the Brownian motion driving the Bitcoin price process is modified to make S an F-martingale, while the drift of the Brownian motion which is strongly orthogonal to S is not affected by the change measure from P to b P. More precisely, by Girsanov's theorem, the R 2 -valued process c is an F; b P -standard Brownian motion. Under any equivalent martingale measure, the discounted Bitcoin price processS ¼S t ; t ∈ 0; T ½ È É given byS t ≔ St Bt , for each t ∈ 0; T ½ behaves like a martingale. Precisely, on the probability space Ω; F ; b P , the pairS; A À Á has the following dynamics: Equivalently, we can write the discounted Bitcoin price processS as Clearly, under the minimal martingale measure b P, the Bitcoin price process S satisfies where r t ð Þ is the risk-free interest rate at time t.
Remark 3.2. Note that, under any equivalent martingale measure that keeps the drift of the attention factor dynamics linear in A (in particular, under the minimal martingale measure), the model proposed in [10] nests the Hull-White stochastic volatility model, which corresponds to the particular case where σ S ¼ 1; see [19]. Indeed, the authors only referred to a risk-neutral framework without describing the dynamics under the physical measure and consequently characterizing the existence of any equivalent martingale measure. Now, we compute the fair price of a Bitcoin European call option via the risk-neutral evaluation approach, so it can be expressed as expected value of the terminal payoff under the selected pricing measure, that is, the minimal martingale measure. Let C T = (S T À K) + be the F T -measurable random variable representing the payoff of a European call option on the Bitcoin with price S with date of maturity T and strike price K, which can be traded on the underlying digital market. Recall that X t, T ¼ X T À X t , for each t ∈ 0; T ½ Þ, refers to the variation of the integrated attention process X defined over the interval t; T ½ . Then, denote by E b P ÁjF t ½ the conditional expectation with respect to the σ-field F t under the probability measure b P and so on. Define the function C BS : 0; T ½ ÞÂR þ Â R þ ! R as follows: where and d 2 t; s; x ð Þ¼d 1 t; s; x ð ÞÀσ S ffiffi ffi x p , or more explicitly Here, N stands for the standard Gaussian cumulative distribution function, that is, The following result provides the risk-neutral price of the option under the minimal martingale measure b P. The proof is straightforward and may be derived by using similar arguments to those developed in [19]. Proposition 3.3. The risk-neutral price C t at time t of a European call option written on the Bitcoin with price S expiring in T and with strike price K is given by the formula where the function C BS is defined in Eq. (15); the functions d 1 Á ð Þ, d 2 Á ð Þ are, respectively, given in Eqs. (16)- (17); and f Xt,T Á ð Þ denotes the density function of X t, T , for each t ∈ 0; T ½ Þ, provided that it exists.
Hence, the resulting risk-neutral pricing formula when evaluated in S t corresponds to the expected value of Black & Scholes price as defined in [20] at time t ∈ 0; T ½ Þ of a European call option written on S, with strike price K and maturity T, in a financial market where the volatility is random and given by σ S ffiffiffiffiffiffi ffi Xt,T TÀt q .

A numerical application
In order to appreciate the performance of the pricing formula in Eq. (19), we compute model prices for option traded on the online platform http://www.deribit.com on July, 30, 2017, by plugging in the estimated parameters. The outcomes are compared with the Black & Scholes benchmark (see [20]) as a reference price, computed by plugging the volatility parameter estimated on the same time series of the trading volume/SVI index, and with the bid-ask prices provided in the website. Best overall pricing values are obtained when market attention is measured by volume; in the case of the SVI Google index, near-term options are very close to the mid-value of the bid-ask, while next-term options are overpriced. One possible explanation is that investors that get information about Bitcoin on search engines are more likely to be uninformed/retail investors that are self-exciting and may add spurious noise to the Bitcoin price volatility leading to an increase in call option prices ( Table 2).

The presence of model stock bubbles
Motivated by empirical evidences (see for example [21,22]), we discuss a generalization of the model introduced in Section 3.1, which is capable to describe speculative bubbles in Bitcoin markets.
Precisely, we fix a finite time horizon T > 0 and assume that the underlying Brownian motions W and Z are correlated with constant correlation coefficient r ∈ À1; 1 ð Þ, that is, < W, Z> t ¼ rt gis an additional F; P ð Þ-Brownian motion that is Pindependent of Z, then we can write Without loss of generality, we assume that the interest rate is fixed and equal to zero. In this setting, the discounted Bitcoin price trend and the market attention factor dynamics are described by where we have set r ≔ ffiffiffiffiffiffiffiffiffiffiffiffiffi 1 À r 2 p . The aim is to investigate the existence of asset-price bubbles in the underlying Bitcoin market model. By simulating trajectories for the asset price S according to the model in Eq. (1) for several values of the correlation parameter, it seems that the latter is related to the presence of bubble effect; in fact, in Figure 2, we plot examples of trajectories for r ¼ 0, À 0:5, 0:5, 1, respectively where higher positive values for the correlation appear to boost the asset value.
Indeed, we will show formally that the possibility of Bitcoin speculative bubbles is related to the sign of the correlation parameter r.
The mathematical theory of financial bubbles is developed, among others, in [23][24][25]. Precisely, we introduce the following definition from [23]. The term strict F-local martingale refers to the fact that S is an F-local martingale, but not a true F-martingale under the chosen risk-neutral measure. Further, since S is nonnegative, we must have that S is an F-supermartingale (we refer to [26] for rigorous definitions and related concepts). Recall that the absence of arbitrage opportunities is "essentially" equivalent to the existence of a probability measure Q, equivalent to the initial probability P, under which the discounted price process satisfies the martingale property.
Remark 4.2. Note that stock bubbles arise if S has an equivalent local martingale measure but not an equivalent martingale measure. Arbitrage appears only if no equivalent local martingale measure exists.
Then, to exclude arbitrage opportunities from the market, we define the process L ¼ L t ; t ∈ f 0; T ½ gby setting gare F-adapted processes satisfying the integrability conditions Ð T 0 λ 2 u du < ∞ P-a.s. and Ð T 0 γ 2 u du < ∞ P-a.s., respectively. The (local) martingale property of the discounted Bitcoin price process S under Q implies the following condition: PÀ a:s:: To ensure that L provides the density process of a probability measure equivalent to P, we require that E L T ½ ¼ 1, meaning that L is an F; P ð Þ-martingale. The processes λ and γ are interpreted, respectively, as the risk premium and the risk perception associated to the future direction or future possible movements of the Bitcoin market. For each choice of the process γ, the process λ is fixed by Eq. (23), that is, and we can consider the corresponding family of equivalent (local) martingale measures Q γ for S parameterized by the process γ. To check if there are stock bubbles in the underlying market model, we study under which conditions the discounted Bitcoin price is a strict F; P ð Þ-local martingale with respect to an equivalent local martingale measure Q γ : By applying Girsanov's theorem, the dynamics of the model under Q γ is described by the following equations: where the R 2 -valued processṼ ; Now, suppose that the risk perception process is zero, that is, γ 0. Then, the change of measure from P to Q 0 is well-defined since the associated density process M ¼ M t ; t ∈ 0; T ½ f g satisfying is a true F; P ð Þ-martingale thanks to [27]. We have the following result, which allows to detect the presence of bubbles in this setting. The proof is based on the application of some of Sin's results given in [27], where the existence of risk-neutral measures for the Hull-White stochastic volatility model [19] and for similar frameworks is determined by the possibility of explosion in finite time for solutions of certain auxiliary stochastic differential equations. Precisely, it is possible to show that the martingale property of the discounted stock price S under Q 0 , given in Eq. (25) with γ ¼ 0, is fulfilled if and only if r ≤ 0: Hence, a bubble arises if and only if the correlation parameter between stock returns and market attention is positive.

Toward a multiexchange generalization
Let us generalize the model introduced in Eq. (1) by assuming a possible delay τ for the attention factor to affect the Bitcoin price dynamics. Assume that the attention factor has been observed or is described by a deterministic function for t ∈ Àl; 0 ½ with l ≥ τ. We get where φ : Analogous results as those in Section 2 can be derived by similar computations, and model parameters, for a fixed delay, can be estimated by means of the maximum likelihood method. In order to estimate the delay parameter, we maximize the profile likelihood as defined in [15]. Details of this procedure can be found in [10]. The estimation results of model in Eq. (27) on the same daily data considered in Section 2 are summed up in Table 3.
In Figure 3, we plot simulated trajectories of the price process in Eq. (27) by letting the delay parameter vary. In particular, considering for instance two exchanges, we have where φ : Àl; 0 ½ !R þ with l > max τ 1 ; τ 2 f gand μ i A , μ i S , σ i A > 0, σ i S > 0 for i = 1, 2 are constant parameters.
Note that within this model, prices for Bitcoin traded in different exchanges are perfectly correlated. Indeed, this is what happens in observed data; considering daily prices from January 2015 to June 2017 for Bitstamp, Kraken, Cex.io, Gdax, and The Rock exchanges we get cross-correlation values larger than 0.999.
We fit model in Eq. (28) for the Bitstamp and Gdax exchanges on daily observations of Bitcoin price from January 2015 to June 2017 obtaining the outcomes reported in Table 4, when the  attention is measured by the trading volume, and in Table 5, when attention is measured by the Google SVI index.
It is evident from the outcomes in Table 4 that the model parameters are not significantly different while the delay might be quite different as if the reaction to the attention factor is faster for some exchanges and slower for others. On the contrary, when attention is measured by the Google SVI Index, the delay is unchanged, but the difference between estimated parameters for the price dynamics is nonnegligible.
By analyzing the outcomes and considering the shift effect as depicted in Figure 3, it is tempting to conjecture that the faster reaction determines the leader exchanges and that the slower exchange will then follow. If we could forecast that the next day price of the slower exchange will reach the price today for the faster one, we could obtain a profit by suitably investing in the two exchanges. However, it is worth noticing that the estimation of the delay parameter is obtained by maximizing the likelihood over a whole time series and is a product of averaging so arbitrage cannot be achieved in a direct way.
Nevertheless, in a multivariate setting as ours, the theory guarantees that arbitrage opportunities are ruled out if the market price of risk in the market is unique. Without entering technical details and assuming r ¼ 0 for the sake of simplicity, this is true if and only if It is evident that these values are not equal if we plug parameter estimates in Eq. (30); hence, arbitrage opportunities are not ruled out at least from a theoretical point of view. We will address this issue more precisely in future research.

Conclusion
In this chapter, we have introduced a model in continuous time in order to describe the dynamics of Bitcoin price depending on an exogenous stochastic factor, which represents market attention on the Bitcoin system. Market attention is measured either by the total trading volume in Bitcoins or by means of the Google Search Volume Index, which, as suggested in [16], is a direct measure of the revealed attention for uniformed retail investors. More precisely, the attention factor affects directly the instantaneous mean and volatility of logarithmic returns; in addition, it may be also correlated with the price changes. An estimation procedure to fit the model to observed data is also suggested and, under the assumption of no correlation, a closed formula for standard European option prices on Bitcoin is provided.
By applying outcomes within the mathematical theory of bubbles [23][24][25]27], we are able to show that Bitcoin boosts in a bubble if and only if there is a positive correlation between changes in the price and in the attention factor. This finding is reasonable and claims that a stronger positive dependence between the two processes in Eq. (21) may result in an explosion of the price process.
Finally, we allow for a delay on the effect of market attention on the Bitcoin price, and, based on this generalized model, we introduce a multivariate setting for our model (Eq. (28)) in order to take into account the special feature of multiple exchanges where it is possible to trade in Bitcoins. Preliminary results indicate that arbitrage opportunities may arise in two exchanges that are characterized by different delays.