E ﬃ ciency of the Brazilian Bitcoin: A DFA Approach

: Bitcoin’s evolution has attracted the attention of investors and researchers looking for a better understanding of the e ﬃ ciency of cryptocurrency markets, considering their prices and volatility. The purpose of this paper is to contribute to this understanding by studying the degree of persistence of the Bitcoin measured by the Hurst exponent, considering prices from the Brazilian market, and comparing with Bitcoin in USD as a benchmark. We applied Detrended Fluctuation Analysis (DFA), for the period from 9 April 2017 to 30 June 2018, using daily closing prices, with a total of 429 observations. We focused on two prices of Bitcoins resulting from negotiations made by two di ﬀ erent Brazilian ﬁnancial institutions: Foxbit and Mercado. The results indicate that Mercado and Foxbit returns tend to follow Bitcoin dynamics and all of them show persistent behavior, although the persistence in slightly higher for the Brazilian Bitcoin. However, this evidence does not necessarily mean opportunities for abnormal proﬁts, as aspects such as liquidity or transaction costs could be impediments to this occurrence.


Introduction and Literature Review
Financial markets represent a broad issue that has been well studied in the literature. One of the most interesting topics is analysis of the Efficient Market Hypothesis (EMH), which is used to support the analysis made in this work. It is acknowledged as a fundamental financial theory by (Fama 1970), which considers that competition among the many intelligent participants of a market assures that actual prices of individual securities reflect the effects of information based both on events that have already occurred and those which the market expects to take place in the future. Fama (1970) identified three distinct levels at which the market might actually be efficient: (i) strong-form EMH; (ii) semi-strong-form EMH and (iii) weak-form EMH.
The strong form of EMH is identified when there is an indication that all relevant information about the value of a share is quickly and accurately reflected in the market price. Therefore, when this category is identified, semi-strong-form EMH is a slightly less rigorous form, which is however less difficult to test than the strong form. Weak-form EMH implies that the future price cannot be predicted from a study of past prices. The approach we use in this paper could be linked with this weak form.
Therefore, according to previous studies like (Mandelbrot 1971;Fama and French 1988;Brock et al. 1992), long-term memory can exist in financial asset returns whenever the weak form of market hypothesis cannot be rejected, indicating that investors cannot earn consistently abnormal profits based on past information, and asset prices follow a random walk behavior. If the weak form is rejected, there is an indication that investors can earn abnormal profits. Different methodologies can be used to study the existence of long-term memory in time series, with the Detrended Fluctuation Analysis (DFA) being one of them. This DFA, which will be presented in the next section, is widely used in finance. See, for example, (Liu et al. 1997;Ausloos 2000;Ausloos and Ivanova 2003;Grech and Mazur 2013) among many others.
Cryptocurrencies are a particular case of a financial asset. Interest in cryptocurrencies has grown significantly in recent years due to some advantages they provide, such as low transaction costs or being a peer-to-peer system. Moreover, it is important to note that cryptocurrencies are independent of any government or monetary authority (Nakamoto 2018). According to (Velde 2013), Bitcoin is a digital currency with no physical form, with a competitive and decentralized process called "mining" generating new Bitcoins. Its value is determined based on a secured open-source algorithm.
Each Bitcoin has a unique blockchain to avoid double-trading and falsification (Nakamoto 2018). There are, however, risks associated with the transaction of Bitcoins. According to (Kaplanov 2012), governments consider Bitcoin a threat, since it can hamper the use of currency control as an economic policy to achieve political goals (Staiger and Sykes 2010). Moreover, (Trautman 2014) highlights some of Bitcoin's negative episodes. One of the most important was the Silk Road website, which was used to sell drugs and Bitcoins allowed payments to be made under anonymity. Nevertheless, as claimed by (Ponsford 2015), many governments do not impede the use of Bitcoin but warn their citizens about its risks.
In recent years, Bitcoin's evolution has attracted the attention of investors, the media, regulators and researchers, especially looking for a better understanding of the efficiency of the cryptocurrency markets, as well as their prices and volatility (Bariviera 2017;Wang 2018;Takaishi 2018;Zhang et al. 2018Zhang et al. , 2019. The literature on EMH regarding Bitcoin is vast and increasing quickly. For an interesting survey on EMH in cryptocurrency markets, see (Kyriazis 2019). To fulfil our purpose, we focus our review on work that analysed EMH with an Econophysics' approach, for better comparison of our results. Urquhart (2016) studied Bitcoin's degree of efficiency through various statistical methods, including the Hurst coefficient, and rejected the hypothesis of weak efficiency in the full sample, despite concluding there was a trajectory towards efficiency over time, since in the second subsample the result found was closer to weak efficiency. Revisiting the topic, (Bariviera 2017) investigated some statistical properties of the Bitcoin market, comparing Bitcoin and standard currencies' dynamics and focusing on the analysis of returns at different time scales. They used the Detrended Fluctuation Analysis (DFA) method to test the presence of long memory from 2011 to 2017. The results detected that the Hurst exponents change significantly during the first years of the existence of Bitcoin, tending to stabilize after some time. Tiwari et al. (2018) through several long memory tests, among them the DFA, found that the Bitcoin market was efficient except for short periods from April to August 2013 and August to November 2016.
In addition to previous evidence, incorporating a multifractality approach, (Alaoui et al. 2019) through multifractal cross-correlation found that Bitcoin shows nonlinear dependence and multifractality in the relationship between price and volume, which implies inefficiency. Garnier and Solna (2019) addressed the question of to what extent this novel cryptocurrency market can be viewed as a classic or semi-efficient market. They used novel, robust tools for estimation of multi-fractal properties to show that the Bitcoin price has a very interesting multi-scale correlation structure. Through the Hurst exponent, they analyzed whether the multi-fractal character of the underlying signal is well captured. The findings showed that, despite the wild ride of the Bitcoin price in recent years and its multi-fractal and non-stationary character, this price has both local power-law behavior and a very orderly correlation structure.
Also using robust econophysics tools,  through the largest Lyapunov exponent, Shannon entropy and MF-DFA, found that prices showed chaotic behavior as opposed to returns, and in addition, the uncertainty of returns was associated with the period of high prices, as well as evidence of multifractality in prices and returns. The study by ) reinforces the existence of non-linearities, randomness and long-range dependence of Bitcoin markets, finding evidence against efficiency in those markets.
Some studies advance by incorporating other elements, such as different assets or components in order to explain the dynamics of Bitcoin more accurately. Bariviera et al. (2017) used the DFA method and found that Bitcoin has high volatility, decreasing over time, particularly after 2014, and that long-term memory is not related to market liquidity. Then again, (Brauneis and Mestel 2018) analyzed the price discovery of various cryptocurrencies, as well as relating to liquidity measures, and found that the higher the cryptocurrency liquidity, the greater the inefficiency, due to the possibility of achieving abnormal profits. Al-Yahyaee et al. (2018) analyzed the efficiency of the Bitcoin market compared to gold, stock and foreign exchange markets. They applied an MF-DFA approach for non-stationary time series and the results demonstrated that the long-memory feature and multifractality of the Bitcoin market was stronger, and Bitcoin was therefore more inefficient than gold, stock and currency markets.
In addition to these broad analyses, (Köchling et al. 2019) investigated whether an introduction of futures markets altered Bitcoin prices through various statistical tests, among them the Hurst coefficient. The authors concluded that after the launching of futures, they cannot reject the market efficiency of Bitcoin. These results are consistent with more mature currency markets, by allowing short selling and facilitating access to institutional investors operating in these markets.
In a dynamic comparison, (Charfeddine and Maouchi 2019) studied the four largest cryptocurrencies (Bitcoin, Ethereum, Litecoin, Ripple) with regard to market efficiency and long-range dependency. Consistent with (Urquhart 2016;Tiwari et al. 2018), the authors verify the inefficiency of cryptocurrencies, with the exception of Ethereum. Caporale et al. (2018) used the Hurst exponent to analyze the degree of persistence of the four major cryptocurrencies. Based on a sliding windows analysis to study the evolution of persistence over time, the authors found that the market is inefficient, but becomes less so over time. Jiang et al. (2018) studied the time-varying long-term memory in the Bitcoin market through a rolling window approach and using a new efficiency index (Sensoy 2019). They used a daily dataset for the period from 2010 to 2017. The findings showed that all of the generalized Hurst exponents in the Bitcoin market are above 0.5, indicating a high degree of inefficiency and long-term memory. Moreover, the Bitcoin market does not become more efficient over time. Also reporting inefficiency, (Alvarez-Ramirez et al. 2018) studied long-range correlation and asymmetry through DFA and concluded that Bitcoin was inefficient due to the occurrence of bubbles in certain time periods, leading to anti-persistent price behavior.
Additionaly, in a comparison over time, Costa et al. (2019) analyzed the long-range behavior with DFA and DCCA correlation of the 4 largest cryptocurrencies (Bitcoin, Ethereum, Ripple and Litecoin) and concluded that Bitcoin is the most efficient, followed by Ripple, and that Ethereum and Litecoin showed persistent behavior. In the short term, all cryptocurrencies were correlated with Bitcoin, whereas only Ripple was correlated with Bitcoin over longer periods.
Incorporating evidence from a major emergent market economy, (Kristoufek 2018) analyzed Bitcoin prices in USD and CNY (remimbi) using an efficiency index based on long-range dependence, fractal dimension and entropy. The prices remain inefficient between 2010 and 2017, over almost the entire evaluation period, except for a short period of price slowdown after a similar process of price bubble formation.
So, previous papers reveal there is still a lack of knowledge about the dynamics of these cryptocurrencies in emerging markets. In this work we use Detrended Fluctuation Analysis (DFA) to identify the relative efficiency of two prices of Bitcoins resulting from negotiations made by the following Brazilian financial institutions: Foxbit and Mercado. Our paper is an innovative proposal, since it uses specific information from the Brazilian Bitcoin market. To the best of our knowledge, this is the first article to analyze the degree of dependence in Bitcoin prices in Brazil.
DFA has been widely applied to measure the efficiency of markets, and we follow this procedure. In practical terms, this research on Bitcoin efficiency can provide information and indicators to support the planning and processing of decision-making by investors and policymakers.
The remainder of the paper is organized as follows: the method and data are shown in Section 2; the results are presented and discussed, followed by efficiency analysis, in Section 3. Finally, Section 4 summarizes the considerations of the paper.

Detrended Fluctuation Analysis
Proposed originally by (Peng et al. 1994), according to (Sukpitak and Hengpunya 2016), the main advantage of the DFA is its ability to distinguish an intrinsic autocorrelation related to memory effect imposed by non-stationarity trends. The main steps of the DFA method are as follows: let the log-return of the time series be given by where P(t) refers to asset price at time t = 1, . . . , N. So, from the log-return, it establishes a profile given by where x is the average value of the time series x(t) and k = 1, . . . , N. Thus, according to Sukpitak and Hengpunya (2016), the DFA integrated signal y(k) allows us to analyze the long-term correlation in x(t) by drawing the trend effect. The time series y(k) is divided into M = int N n non-overlapping boxes with the same size n, and are indexed by m = 1, . . . , M and the starting point is written by k nm .
For each m-th block of size n, the local trend y nm (k) is calculated with ordinary least squares for each box, and thereafter y(k) is detrended by y nm (k), and the root mean squared fluctuation of the detrended and integrated series is calculated as follows: The process is repeated over all box sizes in order to characterize the relationship between average detrended fluctuation F(n) and the timescale n. The value of F(n) grows as the box size increases. Thus, a linear association between F(n) and n in a log-log comparison denotes the existence of a power law. In this manner, the slope of the regression between log F(n) and logn determines the Hurst (H) coefficient, i.e., F(n) ∝ n H . If H = 0.5, the time series is a random walk (and the market is considered as efficient); if H < 0.5, the time series has an anti-persistent behavior (negative long-range dependence); if 0.5 < H < 1, it has persistent behavior (positive long-range behavior); if H = 1 it is a pink noise; and if H > 1 it indicates that the long-range dependence cannot be explained by a power law, a result that is not common in financial series. Here we apply DFA to finance, but this is a multidisciplinary method used in other research topics see, for example, (Ausloos and Ivanova 1999;Machado et al. 2014).

Data
Our purpose is to study the efficiency of Bitcoin in two different Brazilian institutions. A third variable is used in the analysis, Bitcoin prices in USD, which is used as a benchmark due to being the main cryptocurrency traded in the market. This will allow us to make some comparisons, because the levels of trade and liquidity could be relevant for the results. Bitcoin prices are obtained from Quandl's API, considering the two prices available in this platform for the Brazilian market: Foxbit and Mercado exchanges. Local prices are not considered in this paper, although they are publicly available, because there are a lot of noises in the price series, which prevents identifying the reasons for such price distortions. Although other exchanges trade Bitcoin in Brazil, these are not open to the public, since they do not report to Bitcoin charts, a platform that stores data from different sources around the world.
The beginning of our sample is the earliest price available for the three prices jointly: Foxbit, Mercado and Bitcoin. Our sample comprises the period from 9 April 2017 to 30 June 2018, a total of 429 closing daily prices. Strictly speaking, since Bitcoins are priced 24 h a day and 7 times a week, there is no "closing price", so the last trading recorded by 23 h 59 min 59 s UTC was a proxy for the closing prices. Figure 1 identifies the evolution of the prices for Bitcoin in both Brazilian institutions and for the Bitcoin price in USD. In order make the prices comparable, we transformed them into price indices with the same basis. Nonetheless, Foxbit shows significant price divergence some days before July 2017, and before January 2018 we can see that both Brazilian prices show some divergence until they reach the price spike. Thereafter that, prices seem to become closer towards the end of the sample. and Mercado exchanges. Local prices are not considered in this paper, although they are publicly available, because there are a lot of noises in the price series, which prevents identifying the reasons for such price distortions. Although other exchanges trade Bitcoin in Brazil, these are not open to the public, since they do not report to Bitcoin charts, a platform that stores data from different sources around the world.

Results
The beginning of our sample is the earliest price available for the three prices jointly: Foxbit, Mercado and Bitcoin. Our sample comprises the period from 9 April 2017 to 30 June 2018, a total of 429 closing daily prices. Strictly speaking, since Bitcoins are priced 24 hours a day and 7 times a week, there is no "closing price", so the last trading recorded by 23 h 59 min 59 s UTC was a proxy for the closing prices. Figure 1 identifies the evolution of the prices for Bitcoin in both Brazilian institutions and for the Bitcoin price in USD. In order make the prices comparable, we transformed them into price indices with the same basis. Nonetheless, Foxbit shows significant price divergence some days before July 2017, and before January 2018 we can see that both Brazilian prices show some divergence until they reach the price spike. Thereafter that, prices seem to become closer towards the end of the sample. From returns obtained via differenced log-transformation of prices, we observe in Table 1 that Bitcoin returns are slightly more volatile than those of its Brazilian peers. Also, the three returns show positive skewness, which means positive returns are more frequent. Besides, the three Bitcoin returns had high kurtosis values. The kurtosis results demonstrate leptokurtic distributions, which is a stylized fact in financial markets. However, we considered it important to look at these price dynamics more carefully via Hurst exponents.  Table 2 indicates that for the three Bitcoin prices, the Hurst coefficient is higher than 0.5, suggesting that these price series are persistent, showing long-range autocorrelation. More From returns obtained via differenced log-transformation of prices, we observe in Table 1 that Bitcoin returns are slightly more volatile than those of its Brazilian peers. Also, the three returns show positive skewness, which means positive returns are more frequent. Besides, the three Bitcoin returns had high kurtosis values. The kurtosis results demonstrate leptokurtic distributions, which is a stylized fact in financial markets. However, we considered it important to look at these price dynamics more carefully via Hurst exponents.  Table 2 indicates that for the three Bitcoin prices, the Hurst coefficient is higher than 0.5, suggesting that these price series are persistent, showing long-range autocorrelation. More specifically, Mercado shows dynamics much closer to Bitcoin than Foxbit returns, which present a stronger persistent behavior. Table 2. Detrended Fluctuation Analysis (DFA) estimates for Bitcoin returns. The first value refers to the Hurst exponent and the second one to the respective standard deviation (both resulting from the log-log regression between F(n) and n).

DFA Estimation
Bitcoin (USD) 0.5949 ± 0.0160 Foxbit 0.6333 ± 0.0201 Mercado 0.6080 ± 0.0236 From Figure 2, it is clear that the straight line of least squares shows goodness of fit for the three returns. In all the Bitcoin returns considered in our sample span, we reject random-walk behavior, given that no Hurst coefficients include 0.5 in the confidence interval. specifically, Mercado shows dynamics much closer to Bitcoin than Foxbit returns, which present a stronger persistent behavior. From Figure 2, it is clear that the straight line of least squares shows goodness of fit for the three returns. In all the Bitcoin returns considered in our sample span, we reject random-walk behavior, given that no Hurst coefficients include 0.5 in the confidence interval. Table 2. Detrended Fluctuation Analysis (DFA) estimates for Bitcoin returns. The first value refers to the Hurst exponent and the second one to the respective standard deviation (both resulting from the log-log regression between F(n) and n). The vertical axis corresponds to the logarithm of F(n) and the horizontal axis to the logarithm of n (the scale, in days). In all cases the R 2 is high, demonstrating the quality of the Hurst exponents.

Conclusions
This paper calculated the degree of Bitcoin's market efficiency in Brazil, based on the DFA approach, between 9 April 2017 and 30 June 2018. The two Brazilian Bitcoin prices subject to the analysis were Foxbit and Mercado.
The Hurst exponents obtained through the DFA for the return series were 0.6333 for Foxbit, 0.6080 for Mercado and 0.5949 for Bitcoin. Since all prices show coefficients above 0.5, we can conclude that Brazilian as well as Bitcoin USD prices showed persistent behavior, in that a price increase tends to be followed by rising prices, while a price decrease will lead to a reduction in the future price series.
Our results are consistent with Kristoufek (2018), who studied Bitcoin markets with respect to the US dollar and Chinese yuan, an emerging market as the Brazilian one. The author found evidence of strong inefficiency behavior in most of the period between 2010 and 2017 (in the Chinese case, between 2014 and 2017). Only in a few specific time windows do both prices exhibit efficient path dynamics, mainly after spikes. The inefficiency patter of cryptocurrencies in general could also be find in (Kyriazis 2019).
It is interesting to note that the Brazilian Bitcoin market is new and seems to be growing faster. According to a recent article in (Forbes 2018), more Brazilians are trading cryptocurrencies than other traditional equities. So, it will be interesting to follow how this rate of growth in Brazilian transactions with Bitcoin will impact on its pricing mechanism. The vertical axis corresponds to the logarithm of F(n) and the horizontal axis to the logarithm of n (the scale, in days). In all cases the R 2 is high, demonstrating the quality of the Hurst exponents.

Conclusions
This paper calculated the degree of Bitcoin's market efficiency in Brazil, based on the DFA approach, between 9 April 2017 and 30 June 2018. The two Brazilian Bitcoin prices subject to the analysis were Foxbit and Mercado.
The Hurst exponents obtained through the DFA for the return series were 0.6333 for Foxbit, 0.6080 for Mercado and 0.5949 for Bitcoin. Since all prices show coefficients above 0.5, we can conclude that Brazilian as well as Bitcoin USD prices showed persistent behavior, in that a price increase tends to be followed by rising prices, while a price decrease will lead to a reduction in the future price series.
Our results are consistent with Kristoufek (2018), who studied Bitcoin markets with respect to the US dollar and Chinese yuan, an emerging market as the Brazilian one. The author found evidence of strong inefficiency behavior in most of the period between 2010 and 2017 (in the Chinese case, between 2014 and 2017). Only in a few specific time windows do both prices exhibit efficient path dynamics, mainly after spikes. The inefficiency patter of cryptocurrencies in general could also be find in (Kyriazis 2019).
It is interesting to note that the Brazilian Bitcoin market is new and seems to be growing faster. According to a recent article in (Forbes 2018), more Brazilians are trading cryptocurrencies than other traditional equities. So, it will be interesting to follow how this rate of growth in Brazilian transactions with Bitcoin will impact on its pricing mechanism.
Another interest issue refers to the different geographical locations which could have a distinct impact on Bitcoin pricing mechanism. Panagiotidis et al. (2019) highlight the increased influence of Asian markets, in the sense that shocks in this region show more impact on Bitcoin than shocks of other markets (like the European one). So, it is possible that some shocks could reach Latin America (and specifically Brazil) and impact more Brazilian Bitcoins than the USD priced one. This asymmetry can cause differences in Bitcoin prices and justify the existence of differences in our measures of efficiency.
Future research is needed in order to investigate whether these results will be consistent over the coming years with more data available, as well as other methods of market efficiency analysis.
These findings can therefore provide economic agents with useful information, based on better understanding of the Bitcoin price behavior. In fact, they can take advantage of the possible imbalance between Brazilian Bitcoin prices. However, it is important to note that the possibility of earning profits is not an automatic conclusion from this inefficiency of prices, given that there are liquidity and transaction cost issues that were not addressed in this investigation. Nevertheless, the information obtained could be important for local investors.
In further research, we intend to study the correlation behavior of these variables with other assets such as gold, exchange rates or commodities. These are interesting issues that can enhance understanding of these assets' dynamics. Funding: D. Quintino: J. Campoli and H. Burnquist wish to acknowledge the CAPES (Coordination for the Improvement of Higher Education Personnel) and CNPq (National Council for Scientific and Technological Development) for funding support. Paulo Ferreira also acknowledges the financial support of Fundação para a Ciência e a Tecnologia (grants UIDB/05064/2020 and UIDB/04007/2020).

Conflicts of Interest:
The authors declare no conflict of interest.