2504.18982
Model: gemini-2.0-flash
# On Bitcoin Price Prediction
On Bitcoin Price Prediction
Grégory Bournassenko gregory.bournassenko@etu.u-paris.fr
Université Paris Cité
In recent years, cryptocurrencies have attracted growing attention from both private investors and institutions. Among them, Bitcoin stands out for its impressive volatility and widespread influence. This paper explores the predictability of Bitcoinâs price movements, drawing a parallel with traditional financial markets. We examine whether the cryptocurrency market operates under the efficient market hypothesis (EMH) or if inefficiencies still allow opportunities for arbitrage. Our methodology combines theoretical reviews, empirical analyses, machine learning approaches, and time series modeling to assess the extent to which Bitcoinâs price can be predicted. We find that while, in general, the Bitcoin market tends toward efficiency, specific conditions, including information asymmetries and behavioral anomalies, occasionally create exploitable inefficiencies. However, these opportunities remain difficult to systematically identify and leverage. Our findings have implications for both investors and policymakers, particularly regarding the regulation of cryptocurrency brokers and derivatives markets. Contents
1. 1 Introduction
1. 2 The Cryptocurrency Market is Efficient
1. 2.1 Eugene Fama and the Notion of No Arbitrage Opportunities
1. 2.1.1 Efficient Market Hypothesis Adaptation to Cryptocurrencies
1. 2.1.2 Random Walk and Martingale
1. 2.1.3 Cryptocurrencies and Fundamental Value
1. 2.2 From Louis Bachelier to Contemporary Models
1. 2.2.1 Modeling of Traditional Finance
1. 2.2.2 Modeling Crypto-Finance
1. 2.3 Time Series Studies and Analyses
1. 2.3.1 Fundamental Analysis
1. 2.3.2 Chartist / Technical Analysis
1. 2.3.3 Machine Learning
1. 3 The Cryptocurrency Market is Inefficient
1. 3.1 Robert Shiller and the Notion of an Inefficient Market in Terms of Arbitrage
1. 3.1.1 Volatility and Expected Dividends
1. 3.1.2 Behavioral Finance and Market Anomalies
1. 3.1.3 Speculative Bubbles
1. 3.2 Informational Inefficiency
1. 3.2.1 Market Manipulation
1. 3.2.2 Pump & Dump
1. 3.2.3 Natural Language Processing
1. 3.3 Operational Inefficiency
1. 3.3.1 At the Macroscopic Scale
1. 3.3.2 At the Mesoscopic Scale
1. 3.3.3 At the Microscopic Scale
1. 4 Conclusion
1. A isRandomBetter( $\Omega,n,k$ )
1. B isSMABetter( $\Omega,n,r$ )
1. C getHoldReturn(asset)
1. D getSMAReturn(asset, n, r)
1. E getRandomReturn(asset)
1. F getRandomPerc( $\Omega$ )
1. G getAverageAccuracy( $\Omega,n$ )
1. H NLP Trading Bot
List of Figures
1. 1 Introduction
1. 3 $\blacktriangle 9,000\%$ BTC/USD [2014-2022]
1. 2.1 Eugene Fama and the Notion of No Arbitrage Opportunities
1. 6 $\blacktriangle 14,000\%$ DOGE/USD [01/2021-05/2021]
1. 2.1.1 Efficient Market Hypothesis Adaptation to Cryptocurrencies
1. 9 $\blacktriangle 150\%$ BTC/USD [13/06/2017-01/09/2017]
1. 10 $\blacktriangledown 15\%$ BTC/USD [16/01/2018-17/01/2018]
1. 11 $\blacktriangledown 22\%$ BTC/USD [14/04/2021-25/04/2021]
1. 12 Correlation between BTC/USD, GOLD/USD, and S&P500
1. 13 S&P500 over the period available with BTC/USD
1. 14 GOLD/USD over the period available with BTC/USD
1. 2.1.3 Cryptocurrencies and Fundamental Value
1. 2.2.1 Modeling of Traditional Finance
1. 2.2.1 Modeling of Traditional Finance
1. 21 RSI Signals for BTC/USD
1. 22 SAR Signals for BTC/USD
1. 2.3.3 Machine Learning
1. 2.3.3 Machine Learning
1. 27 Results of the ARIMA model
1. 28 Evolution of the S&P500 and dividends
1. 29 Results from the NLP trading bot
List of Tables
1. 1 Results of isRandomBetter( $\Omega,n,k$ )
1. 2 Results of isSMABetter( $\Omega,n,r$ )
1 Introduction
The price of Bitcoin has lost almost 50% of its value since last November, almost as much as Orpeaâs stock value after its scandal. In Orpeaâs case, the correlation is clear with the scandal, but for Bitcoin, such irrational volatility is rather usual.
<details>
<summary>extracted/6391907/images/btc-new.png Details</summary>

### Visual Description
## Candlestick Chart: Price Fluctuation Over Time
### Overview
The image presents a candlestick chart illustrating price fluctuations over time. The chart spans from October 2021 to April 2022. The y-axis represents price in thousands (k), ranging from 30k to 70k. The x-axis represents time, marked by months. The chart uses candlestick patterns (red and green) to indicate price movements within each period.
### Components/Axes
* **Y-Axis (Price):** Ranges from 30k to 70k, with increments of 5k.
* **X-Axis (Time):** Labeled with months: Oct 2021, Nov 2021, Dec 2021, Jan 2022, Feb 2022, Mar 2022, Apr 2022.
* **Candlesticks:** Each candlestick represents a period (likely a day or week).
* **Green Candlesticks:** Indicate a price increase during the period (closing price higher than opening price).
* **Red Candlesticks:** Indicate a price decrease during the period (closing price lower than opening price).
### Detailed Analysis
* **October 2021:** Starts around 47k, shows an upward trend, reaching approximately 62k by the end of the month.
* **November 2021:** Continues the upward trend, peaking around 67k in the middle of the month, then fluctuating between 60k and 65k.
* **December 2021:** Shows a significant downward trend, dropping from around 60k to approximately 47k.
* **January 2022:** Continues the downward trend, fluctuating between 40k and 50k.
* **February 2022:** Reaches a low point around 35k, then shows an upward trend towards the end of the month, reaching approximately 45k.
* **March 2022:** Fluctuates between 40k and 45k, with some upward spikes.
* **April 2022:** Shows a slight downward trend, starting around 45k and ending around 38k.
### Key Observations
* **Peak:** The highest price point is observed in November 2021, around 67k.
* **Lowest Point:** The lowest price point is observed in February 2022, around 35k.
* **Volatility:** The period from October 2021 to December 2021 shows high volatility, with significant price swings.
* **Downward Trend:** A clear downward trend is visible from December 2021 to February 2022.
* **Recovery:** A slight recovery is observed from February 2022 to March 2022, followed by a slight decline in April 2022.
### Interpretation
The candlestick chart illustrates the price dynamics of an asset over a seven-month period. The initial upward trend in October and November 2021 suggests a bullish market sentiment. However, the subsequent decline from December 2021 to February 2022 indicates a shift towards a bearish market. The recovery in late February and March 2022 suggests a potential stabilization or a weak bullish reversal, but the slight decline in April 2022 indicates continued uncertainty. The chart highlights the importance of monitoring price trends and volatility to understand market sentiment and make informed decisions.
</details>
Figure 1: $\blacktriangledown 50\%$ BTC/USD [11/2021-02/2022]
<details>
<summary>extracted/6391907/images/orpea-new.png Details</summary>

### Visual Description
## Candlestick Chart: Stock Price Over Time
### Overview
The image is a candlestick chart showing the price fluctuations of a stock or asset over time, from December 2021 to April 2022. The chart uses red and green candlesticks to represent price decreases and increases, respectively, within each time period.
### Components/Axes
* **Y-axis (Vertical):** Represents the price, ranging from approximately 20 to 120. Gridlines are present at intervals of 20.
* **X-axis (Horizontal):** Represents time, with labels for December 2021, January 2022, February 2022, March 2022, and April 2022.
* **Candlesticks:** Each candlestick represents a specific time period.
* **Green Candlesticks:** Indicate that the closing price was higher than the opening price.
* **Red Candlesticks:** Indicate that the closing price was lower than the opening price.
* The body of the candlestick represents the range between the opening and closing prices.
* The "wicks" or lines extending above and below the body represent the highest and lowest prices during that period.
### Detailed Analysis
* **December 2021 - January 2022:** The price fluctuates around 80-90, with both red and green candlesticks indicating periods of increase and decrease. The price appears relatively stable during this period.
* **Late January 2022 - Early February 2022:** There is a significant drop in price. A large red candlestick indicates a substantial decrease in price within a single period. The price falls from approximately 80 to around 40.
* **February 2022 - April 2022:** The price remains relatively stable, fluctuating between approximately 30 and 40. There are both red and green candlesticks, but the overall trend is sideways with a slight downward drift.
### Key Observations
* **Significant Price Drop:** The most notable event is the sharp price decrease between late January and early February 2022.
* **Volatility:** The period from December 2021 to January 2022 shows more volatility compared to the period from February 2022 to April 2022.
* **Sideways Trend:** After the price drop, the stock enters a sideways trend with relatively small price fluctuations.
### Interpretation
The candlestick chart illustrates the price movement of an asset over a five-month period. The initial stability gives way to a sharp decline, followed by a period of low volatility and sideways movement. This could indicate a significant event or change in market sentiment that impacted the asset's value. The subsequent stabilization suggests that the market has adjusted to the new price level, but there is no clear indication of a recovery.
</details>
Figure 2: $\blacktriangledown 50\%$ ORP [01/2022-03/2022]
The notion of prediction is vague, especially regarding price prediction: isnât price itself the result of agentsâ predictions about the value of an asset? Are we therefore predicting a prediction? For simplicity, we will use the term prediction as defined by American economist Alfred Cowles in his paper [Cowles 3rd, 1933], particularly in the second part, where he analyzes the reliability of "forecasters" on stock market volatility. Bitcoin, for its part, is a decentralized cryptocurrency, created in 2008, based on a "proof of work" mining protocol and a robust transaction system as explained by Satoshi Nakamoto [Nakamoto, 2008].
<details>
<summary>extracted/6391907/images/btc-new2.png Details</summary>

### Visual Description
## Line Chart: Bitcoin Price Over Time
### Overview
The image is a line chart showing the price of Bitcoin over time, from 2015 to 2022. The chart displays the price fluctuations in Bitcoin, with significant increases and decreases over the years. The chart uses two lines, one green and one red, which appear to overlap closely, suggesting they represent similar data or perhaps high and low values for each day.
### Components/Axes
* **X-axis:** Represents time, labeled with years from 2015 to 2022.
* **Y-axis:** Represents the price of Bitcoin, with values ranging from 0 to 70k (presumably USD). The scale is marked at intervals of 10k (0, 10k, 20k, 30k, 40k, 50k, 60k, 70k).
* **Data Series:** Two lines, one green and one red, that closely follow each other, indicating the price fluctuations. There is no explicit legend, but the lines likely represent daily high and low prices.
### Detailed Analysis
* **2015-2017:** The price remains relatively stable and close to 0.
* **2017-2018:** A significant increase occurs, peaking around 20k in early 2018, followed by a sharp decline.
* **2018-2020:** The price fluctuates between approximately 5k and 10k.
* **2020-2021:** A massive surge begins in late 2020, reaching a peak of approximately 65k-70k in 2021.
* **2021-2022:** The price experiences high volatility, with multiple peaks and dips, generally trending downward from the 2021 high. The price ends around 40k in 2022.
**Specific Data Points (Approximate):**
* **2015:** Price near 0.
* **Early 2018:** Peak around 20k.
* **2019-2020:** Fluctuating between 5k and 10k.
* **Late 2021:** Peak around 65k-70k.
* **2022:** Ends around 40k.
### Key Observations
* The most significant price increase occurred between 2020 and 2021.
* The price is highly volatile, especially after 2020.
* The green and red lines are very close, suggesting they represent a daily range.
### Interpretation
The chart illustrates the dramatic rise and fall of Bitcoin's price over a relatively short period. The initial stability from 2015-2017 is followed by periods of rapid growth and subsequent corrections. The volatility observed after 2020 indicates a more mature, yet still highly speculative, market. The close proximity of the green and red lines suggests that while the price fluctuates daily, the overall trend is consistent. The data suggests that Bitcoin is a high-risk, high-reward investment, subject to significant market fluctuations.
</details>
Figure 3: $\blacktriangle 9,000\%$ BTC/USD [2014-2022]
As shown above, Bitcoin has progressively gained success: initially used for anonymous transactions on illegal markets, it became a speculative tool for individuals, and eventually attracted institutional interest, despite limited daily usage [Baur et al., 2015]. Notably, Bitcoinâs underlying technology, Blockchain, was actually invented by researchers Haber and Stornetta [Haber and Stornetta, 1990], not Nakamoto, although Nakamoto was the first to apply it at large scale.
The literature on cryptocurrency prediction remains relatively poor, given the recent emergence of the technology. Virtually no academic papers referenced cryptocurrencies before 2008. Instead, much research focuses on machine learning techniques for cryptocurrency prediction. However, similarities with financial markets exist (closer to forex than stocks due to the monetary nature of cryptocurrencies), a domain extensively studied since the early 1900s. From Louis Bachelierâs Gaussian model [Bachelier, 1900] to Mathieu Rosenbaumâs rough Heston model [Gatheral et al., 2018], and Gordon-Shapiroâs valuation model [Gordon and Shapiro, 1956], numerous theories have been proposed. Yet, debates persist regarding market behavior.
According to Eugene Fama [Fama, 1970], a rational market cannot be systematically beaten. Louis Bachelier [Bachelier, 1900] states, "The determination of these activities depends on an infinite number of factors: therefore, a precise mathematical forecast is absolutely impossible." Nevertheless, Keynes [Keynes, 1937] compared the market to a beauty contest: predicting what the majority will find beautiful, not objective beauty itself. This idea echoes momentum strategies and aligns with Charles Dowâs technical analysis [Brown et al., 1998].
Alternatively, Warren Buffett promotes stock-picking and value investing, diverging from Markowitzâs modern portfolio theory [Steinbach, 2001]. However, Buffettâs method, focusing on selecting promising assets, differs from our study, where the asset (Bitcoin) is preselected. Burton Malkiel [Malkiel, 2003] famously claimed that "a blindfolded monkey throwing darts at a newspaperâs financial pages could perform as well as professional investors," although empirical studies [Pernagallo and Torrisi, 2020] challenge this assertion.
To explore random versus selected portfolios, we define a Python function isRandomBetter( $\Omega,n,k$ ) (code in Appendix A). Results:
| 1 | 141 | 998 | 10 | 10 | 20% | False |
| --- | --- | --- | --- | --- | --- | --- |
| 2 | 141 | 998 | 10 | 20 | 30% | False |
| 3 | 141 | 998 | 20 | 10 | 40% | False |
| 4 | 141 | 998 | 20 | 20 | 30% | False |
| 5 | 141 | 998 | 20 | 30 | 60% | True |
| 6 | 141 | 998 | 30 | 20 | 57% | True |
| 7 | 141 | 998 | 30 | 30 | 47% | False |
| 8 | 141 | 998 | 30 | 10 | 27% | False |
| 9 | 141 | 998 | 10 | 30 | 20% | False |
| 10 | 141 | 998 | 40 | 5 | 25% | False |
Table 1: Results of isRandomBetter( $\Omega,n,k$ )
Choosing a random crypto portfolio in 2021 was not optimal.
We will investigate whether Bitcoin price predictability depends on market efficiency. Given the cryptocurrency marketâs heterogeneity, various scenarios (competitive markets, manipulated markets, rational/irrational agents) are expected.
We will show that, by default, the crypto market tends to be efficient, although inefficiencies sometimes appear, albeit difficult to exploit systematically.
We will address prediction methods under efficient market conditions, focusing on time series analysis and machine learning algorithms. We will also study prediction under inefficiency contexts, emphasizing empirical observations and stylized facts.
Letâs first examine the case when the market is efficient.
2 The Cryptocurrency Market is Efficient
We first assume an efficient market. We will explain the conceptâs origins, assumptions, verify some of them, discuss model evolutions, and their implications for cryptocurrencies. We will also analyze this through machine learning and quantitative techniques, reflecting critically on the results.
2.1 Eugene Fama and the Notion of No Arbitrage Opportunities
We start with Famaâs [Fama, 1970] definition of efficient markets, comparing the US stock market and cryptocurrencies. Famaâs idea implies no arbitrage opportunities. However, as we will see later, arbitrage is relatively common in crypto markets (price differences between brokers).
<details>
<summary>extracted/6391907/images/arb1.png Details</summary>

### Visual Description
## Website Landing Page: KoinKnight
### Overview
The image is a landing page for a service called KoinKnight, which provides personal assistance for cryptocurrency arbitrage. The page features a headline, a brief description of the service, calls to action, and a stylized illustration.
### Components/Axes
* **Header:** Contains the KoinKnight logo, navigation links (Pricing, API Services, Crypto Analytics, Refer & Earn), a language selector (English), and login/signup buttons.
* **Main Content:** Features the headline "Your personal assistance for cryptocurrency arbitrage," a descriptive paragraph, and two buttons: "Try for free" and "View Demo."
* **Footer:** A small line of text: "Already using KoinKnight? Log in"
* **Illustration:** A stylized illustration of a laptop displaying data tables, a calculator, and a yellow circle.
### Detailed Analysis or ### Content Details
* **Headline:** "Your personal assistance for cryptocurrency arbitrage"
* **Description:** "Find the best trade and arbitrage opportunities using KoinKnight's powerful algorithm and real-time data exploration tools."
* **Buttons:**
* "Try for free"
* "View Demo"
* **Footer Text:** "Already using KoinKnight? Log in"
* **Navigation Links:**
* Pricing
* API Services
* Crypto Analytics
* Refer & Earn
* **Illustration Details:**
* Laptop screen displays data tables with red and green horizontal bars.
* A calculator is present.
* A yellow circle is present.
### Key Observations
* The landing page focuses on cryptocurrency arbitrage.
* The service emphasizes the use of a powerful algorithm and real-time data exploration tools.
* The design is clean and modern.
### Interpretation
The landing page aims to attract users interested in cryptocurrency arbitrage by highlighting the benefits of using KoinKnight's algorithm and tools. The "Try for free" and "View Demo" buttons encourage potential users to explore the service further. The illustration visually represents the data-driven nature of the service. The overall message is that KoinKnight provides a user-friendly and effective solution for cryptocurrency arbitrage.
</details>
Figure 4: KoinKnight
<details>
<summary>extracted/6391907/images/arb2.png Details</summary>

### Visual Description
## Website Screenshot: ArbiTool Landing Page
### Overview
The image is a screenshot of the ArbiTool website landing page. It features a modern design with a purple and blue color scheme, geometric shapes, and isometric illustrations. The page promotes a tool that identifies cryptocurrency arbitrage opportunities.
### Components/Axes
* **Header:** Contains the ArbiTool logo, navigation links (Home, About ArbiTool, Tutorial, Pricing, Arbitrage Course, Join Our Community, FAQ's, Contact), language selector (UK flag), and login/signup buttons.
* **Main Content:** Includes a headline, a brief description of the tool's functionality, call-to-action buttons, and an isometric illustration depicting cryptocurrency trading and analysis.
* **Footer:** Contains a section for trading tokens and the Altilly logo.
* **Chat Widget:** Located in the bottom-right corner, offering live chat support.
### Detailed Analysis or ### Content Details
* **Logo:** "AT ArbiTool" with the tagline "Professional Arbitrage" below.
* **Headline:** "Did you know that the rate of the same cryptocurrency may vary by up to 50% on two different exchanges?"
* **Description:** "Our tool will show you where and when to buy LOW and sell HIGH."
* **Call-to-Action Buttons:**
* "TELL ME MORE! â" (with a right arrow)
* "TEST IT FOR FREE â" (with a right arrow)
* **Isometric Illustration:** Depicts various elements related to cryptocurrency trading:
* A laptop displaying the ArbiTool logo and a Bitcoin symbol.
* Charts and graphs representing market data.
* Stacks of coins.
* A group of people sitting in a meeting, presumably discussing trading strategies.
* A server rack.
* A tablet displaying charts and graphs.
* **Footer Text:** "Trade our token on:" followed by the Altilly logo.
* **Chat Widget:**
* Text: "We are here! Live chat now."
* "Laissez un message" (French for "Leave a message") with an upward-pointing arrow.
### Key Observations
* The website uses a clean and modern design to appeal to users interested in cryptocurrency trading.
* The headline highlights a significant potential benefit of using the ArbiTool: the ability to profit from price discrepancies between exchanges.
* The call-to-action buttons encourage users to learn more or try the tool for free.
* The isometric illustration visually represents the tool's functionality and target audience.
* The chat widget provides immediate support to website visitors.
### Interpretation
The ArbiTool landing page is designed to attract users interested in cryptocurrency arbitrage. The headline grabs attention by highlighting the potential for significant profits. The description clearly explains the tool's functionality, and the call-to-action buttons encourage users to engage further. The isometric illustration reinforces the tool's focus on cryptocurrency trading and analysis. The presence of a chat widget indicates a commitment to customer support. The page aims to establish ArbiTool as a reliable and effective solution for identifying and exploiting arbitrage opportunities in the cryptocurrency market.
</details>
Figure 5: ArbiTool
At a discretionary level, however, arbitrage opportunities are rarely exploitable due to transfer fees and liquidity issues.
2.1.1 Efficient Market Hypothesis Adaptation to Cryptocurrencies
Fama [Fama, 1970] outlined several conditions for market efficiency and its three forms. Letâs check them for crypto markets.
First, agents should be rational. In crypto, this is unlikely. For example, Dogecoin rose by 14,000% mainly due to memes and social media [Chohan, 2021]:
<details>
<summary>extracted/6391907/images/doge-new.png Details</summary>

### Visual Description
## Time Series Chart: Price Fluctuation Over Time
### Overview
The image is a time series chart displaying price fluctuations over a period from July 2020 to April 2022. The chart shows a significant price increase around April 2021, followed by volatility and a subsequent decline.
### Components/Axes
* **X-axis (Horizontal):** Time, labeled with months and years. Markers are present at:
* Jul 2020
* Oct 2020
* Jan 2021
* Apr 2021
* Jul 2021
* Oct 2021
* Jan 2022
* Apr 2022
* **Y-axis (Vertical):** Price, with numerical markers.
* 0
* 0.1
* 0.2
* 0.3
* 0.4
* 0.5
* 0.6
* 0.7
* **Data Series:** A single line, alternating between green and red, representing the price. Green indicates an increase in price, while red indicates a decrease.
### Detailed Analysis
* **Jul 2020 - Jan 2021:** The price remains relatively stable near 0.
* **Jan 2021 - Apr 2021:** A gradual increase in price begins.
* **Apr 2021 - Jul 2021:** A sharp, rapid increase in price, followed by high volatility with rapid oscillations between green (price increase) and red (price decrease). The price peaks around 0.7.
* **Jul 2021 - Oct 2021:** The price decreases from its peak, with continued volatility.
* **Oct 2021 - Apr 2022:** A gradual decline in price, with decreasing volatility. The price stabilizes around 0.1.
### Key Observations
* The most significant price movement occurs between April 2021 and July 2021.
* The period after the peak shows a clear downward trend.
* Volatility is highest immediately after the price peak.
### Interpretation
The chart illustrates a period of significant price speculation and correction. The initial stable period suggests low interest or activity. The rapid increase in price around April 2021 indicates a surge in demand or speculative investment. The subsequent volatility suggests market uncertainty and price correction, eventually leading to a lower, more stable price point. The data suggests a "pump and dump" scenario, where an asset's price is artificially inflated, followed by a rapid sell-off.
</details>
Figure 6: $\blacktriangle 14,000\%$ DOGE/USD [01/2021-05/2021]
Individuals should not influence the market. Elon Musk, however, can shift prices with a single tweet:
<details>
<summary>extracted/6391907/images/musk1.png Details</summary>

### Visual Description
## Social Media Post: Elon Musk Tweet about Bitcoin
### Overview
The image is a screenshot of a tweet by Elon Musk, using a meme format to comment on Bitcoin. The tweet includes the hashtag "#Bitcoin" followed by a Bitcoin symbol and a broken heart emoji. The meme features a couple sitting on a couch, seemingly in a state of conflict, with overlaid text representing their dialogue.
### Components/Axes
* **Header:**
* **Author:** Elon Musk (@elonmusk)
* **Tweet Content:**
* **Hashtag:** #Bitcoin (followed by Bitcoin symbol and broken heart emoji)
* **Meme Text:**
* Her: I know I said it would be over between us if you quoted another Linkin Park song but I've found someone else.
* Him: So in the end it didn't even matter?
* **Image:** A photo of a man and woman sitting on a couch, looking away from each other with arms crossed.
* **Footer:**
* **Timestamp:** 3:07 AM - 4 juin 2021. Twitter for iPhone
* **Engagement Metrics:**
* 21,1 k Retweets
* 9986 Tweets cités (French: "Quoted Tweets")
* 210,1 k J'aime (French: "Likes")
* **UI Elements:** Twitter icons for reply, retweet, like, and share are present at the bottom.
### Detailed Analysis or ### Content Details
* **Author:** The tweet is attributed to Elon Musk, with the Twitter handle @elonmusk.
* **Hashtag:** The primary topic is Bitcoin, indicated by the "#Bitcoin" hashtag. The Bitcoin symbol and broken heart emoji suggest a negative sentiment or a downturn in Bitcoin's performance.
* **Meme Text:** The meme uses a common relationship breakup scenario, with the "her" character ending the relationship due to the "him" character quoting a Linkin Park song. The "him" character's response is a direct quote from the Linkin Park song "In the End."
* **Image:** The image visually reinforces the meme's theme of conflict and separation. The couple's body language (looking away, arms crossed) suggests disagreement or emotional distance.
* **Timestamp:** The tweet was posted on June 4, 2021, at 3:07 AM.
* **Engagement Metrics:** The tweet has received a significant number of retweets (21,100), quoted tweets (9,986), and likes (210,100).
* **Language:** The tweet is primarily in English, with some French in the engagement metrics ("Tweets cités" and "J'aime").
### Key Observations
* The tweet uses humor and a popular meme format to comment on Bitcoin.
* The broken heart emoji and the meme's theme suggest a negative sentiment towards Bitcoin.
* The high engagement metrics indicate that the tweet resonated with a large audience.
### Interpretation
The tweet is likely a commentary on the volatility or recent performance of Bitcoin. By using the Linkin Park song quote "In the end, it didn't even matter," Musk implies that despite the initial hype or expectations surrounding Bitcoin, its value or impact may have diminished. The broken heart emoji further reinforces this sentiment of disappointment or loss. The tweet's popularity suggests that many users share a similar sentiment regarding Bitcoin. The use of a meme makes the message more accessible and relatable to a wider audience.
</details>
Figure 7: Negative tweet on 04/06/2021
<details>
<summary>extracted/6391907/images/btc-new3.png Details</summary>

### Visual Description
## Candlestick Chart: Price Fluctuations
### Overview
The image presents a candlestick chart illustrating price fluctuations over time. The chart spans from May 26, 2021, to June 16, 2021. Each candlestick represents a trading day, with green candles indicating a price increase and red candles indicating a price decrease. The y-axis represents the price in thousands (k).
### Components/Axes
* **X-axis:** Represents time, with labels indicating specific dates: May 26 2021, May 29, Jun 1, Jun 4, Jun 7, Jun 10, Jun 13, Jun 16.
* **Y-axis:** Represents price, with markers at 25k, 30k, 35k, 40k, and 45k.
* **Candlesticks:** Each candlestick shows the open, close, high, and low prices for a specific day.
* **Green Candlesticks:** Indicate that the closing price was higher than the opening price.
* **Red Candlesticks:** Indicate that the closing price was lower than the opening price.
* **Vertical Rectangle:** A vertical rectangle spans from approximately June 3 to June 9.
### Detailed Analysis
* **May 26, 2021:** Green candlestick, indicating a price increase. The body of the candle is approximately between 38k and 40k.
* **May 29:** Red candlestick, indicating a price decrease. The body of the candle is approximately between 35k and 39k.
* **Jun 1:** Green candlestick, indicating a price increase. The body of the candle is approximately between 36k and 37k.
* **Jun 4:** Red candlestick, indicating a price decrease. The body of the candle is approximately between 36k and 39k.
* **Jun 7:** Red candlestick, indicating a price decrease. The body of the candle is approximately between 34k and 36k.
* **Jun 10:** Green candlestick, indicating a price increase. The body of the candle is approximately between 34k and 37k.
* **Jun 13:** Green candlestick, indicating a price increase. The body of the candle is approximately between 37k and 39k.
* **Jun 16:** Red candlestick, indicating a price decrease. The body of the candle is approximately between 36k and 40k.
### Key Observations
* The price fluctuates between approximately 33k and 41k during the observed period.
* There are periods of both increasing and decreasing prices, as indicated by the alternating green and red candlesticks.
* The vertical rectangle highlights a period of price volatility or specific interest between June 3 and June 9.
### Interpretation
The candlestick chart provides a visual representation of price movements over a short period. The alternating green and red candlesticks suggest a market with frequent changes in sentiment. The vertical rectangle could indicate a period of increased trading volume, news events, or other factors that influenced price fluctuations. The chart does not provide information about the specific asset being tracked, but it offers insights into its price behavior during the specified timeframe.
</details>
Figure 8: Observed correlation: $\blacktriangledown 15\%$ BTC/USD [04/06/2021-08/06/2021]
No information asymmetry should exist. Yet, insider knowledge (e.g., hacks) creates advantages [Biais et al., 2020].
Information should be free. For crypto, public data is widely available, though high-frequency trading data is costly [Grossman and Stiglitz, 1976].
Taxes should be low. Given international diversity, this varies.
Regarding efficiency forms:
Strong form: all public and private info is priced. However, events like Binanceâs launch in 2017 or the Bitconnect scandal in 2018 show that insiders could have benefited:
<details>
<summary>extracted/6391907/images/btc-new4.png Details</summary>

### Visual Description
## Candlestick Chart: Stock Price Trend (Jun-Oct 2017)
### Overview
The image is a candlestick chart showing the price fluctuations of a stock or asset over time, from June 11, 2017, to October 1, 2017. The chart uses green and red candlesticks to represent price increases and decreases, respectively.
### Components/Axes
* **X-axis (Time):** Labeled with dates: Jun 11 2017, Jun 25, Jul 9, Jul 23, Aug 6, Aug 20, Sep 3, Sep 17, Oct 1.
* **Y-axis (Price):** Labeled with values: 1000, 2000, 3000, 4000, 5000, 6000, 7000.
* **Candlesticks:**
* **Green:** Indicates a price increase (closing price higher than opening price).
* **Red:** Indicates a price decrease (closing price lower than opening price).
* The body of the candlestick represents the range between the opening and closing prices.
* The "wicks" or "shadows" extending from the body represent the high and low prices for that period.
### Detailed Analysis
* **Jun 11 - Jun 25:** The price fluctuates between approximately 2500 and 3000, with a mix of green and red candlesticks, indicating a period of relative stability.
* **Jun 25 - Jul 9:** A slight downward trend is visible, with the price decreasing from around 2700 to approximately 2400.
* **Jul 9 - Aug 6:** A clear upward trend begins, with the price increasing from approximately 2000 to around 3500.
* **Aug 6 - Aug 20:** The upward trend continues, with the price reaching approximately 4500.
* **Aug 20 - Sep 3:** The price fluctuates significantly, reaching a high of approximately 4800 before dropping to around 3800.
* **Sep 3 - Sep 17:** A downward trend is observed, with the price decreasing from approximately 4800 to around 3200.
* **Sep 17 - Oct 1:** A strong upward trend resumes, with the price increasing from approximately 3800 to around 5800.
### Key Observations
* The chart shows periods of both upward and downward trends, as well as periods of relative stability.
* The most significant price increase occurs between Sep 17 and Oct 1.
* The most significant price decrease occurs between Aug 20 and Sep 17.
### Interpretation
The candlestick chart provides a visual representation of the price movements of an asset over time. The trends suggest periods of buying and selling pressure, with the overall trend being upward from July to October. The fluctuations could be due to various market factors, such as news events, economic data, or investor sentiment. The strong upward trend at the end of the period suggests increasing investor confidence or positive developments related to the asset.
</details>
Figure 9: $\blacktriangle 150\%$ BTC/USD [13/06/2017-01/09/2017]
<details>
<summary>extracted/6391907/images/btc-new5.png Details</summary>

### Visual Description
## Candlestick Chart: Stock Price Fluctuation
### Overview
The image presents a candlestick chart illustrating price fluctuations over time. The chart spans from December 2017 to March 2018. The y-axis represents price in thousands (k), ranging from 4k to 22k. The x-axis represents time, marked with dates. The chart uses green and red candlesticks to indicate price increases and decreases, respectively. A vertical grey box highlights a specific time period.
### Components/Axes
* **Y-Axis:** Price (in thousands), ranging from 4k to 22k, with increments of 2k.
* **X-Axis:** Time, labeled with dates: Dec 10 2017, Dec 24, Jan 7 2018, Jan 21, Feb 4, Feb 18, Mar 4.
* **Candlesticks:** Green candlesticks indicate price increases, while red candlesticks indicate price decreases. Each candlestick represents the open, close, high, and low prices for a specific period.
* **Grey Box:** A vertical grey box highlights the period between Jan 7 2018 and Jan 21.
### Detailed Analysis
* **Dec 10 2017 to Dec 24:** The price generally increases from approximately 11k to 20k, with some fluctuations. There are both green and red candlesticks, but the overall trend is upward.
* **Dec 24 to Jan 7 2018:** The price decreases from approximately 20k to 14k. The candlesticks are predominantly red, indicating a downward trend.
* **Jan 7 2018 to Jan 21:** The price continues to decrease, reaching approximately 11k. The candlesticks are mostly red.
* **Jan 21 to Feb 4:** The price decreases further, reaching a low of approximately 7k. The candlesticks are predominantly red.
* **Feb 4 to Feb 18:** The price increases from approximately 7k to 10k. The candlesticks are mostly green, indicating an upward trend.
* **Feb 18 to Mar 4:** The price fluctuates around 10k, with both green and red candlesticks. The overall trend is relatively stable.
### Key Observations
* The period from Dec 10 2017 to Dec 24 shows a significant price increase.
* The period from Dec 24 to Feb 4 shows a significant price decrease.
* The price appears to stabilize around 10k from Feb 18 to Mar 4.
* The grey box highlights a period of price decline.
### Interpretation
The candlestick chart illustrates the volatility of the price over time. The initial increase from Dec 2017 is followed by a significant decline into early February 2018. The price then shows signs of stabilization. The grey box highlights a period of significant price decline, suggesting a period of market correction or negative news. The chart provides a visual representation of market trends and can be used to identify potential buying or selling opportunities.
</details>
Figure 10: $\blacktriangledown 15\%$ BTC/USD [16/01/2018-17/01/2018]
Semi-strong form: all public info is priced. The crypto market reacts quickly to news, as seen with Coinbaseâs NASDAQ listing:
<details>
<summary>extracted/6391907/images/btc-new6.png Details</summary>

### Visual Description
## Candlestick Chart: Price Fluctuations Over Time
### Overview
The image presents a candlestick chart illustrating price fluctuations over time. The chart spans from approximately March 14, 2021, to May 23, 2021. Each candlestick represents a trading day, with green candles indicating a price increase and red candles indicating a price decrease. The y-axis represents the price in thousands (k).
### Components/Axes
* **Y-Axis (Price):** The vertical axis represents the price, with markers at 50k, 55k, 60k, and 65k.
* **X-Axis (Time):** The horizontal axis represents time, with markers at March 14, 2021, March 28, April 11, April 25, May 9, and May 23.
* **Candlesticks:** Each candlestick shows the open, close, high, and low prices for a specific day.
* **Green Candlesticks:** Indicate that the closing price was higher than the opening price.
* **Red Candlesticks:** Indicate that the closing price was lower than the opening price.
* **Gridlines:** Light gray gridlines are present, aiding in the visual estimation of price levels.
### Detailed Analysis
* **March 14, 2021:** The price starts around 52k.
* **March 14 - March 28:** The price fluctuates, with a mix of green and red candlesticks, generally trending upwards to approximately 57k.
* **March 28 - April 11:** The price continues to fluctuate, with a mix of green and red candlesticks, generally trending upwards to approximately 64k.
* **April 11 - April 25:** The price experiences a significant drop, with predominantly red candlesticks, falling to approximately 49k.
* **April 25 - May 9:** The price recovers somewhat, with a mix of green and red candlesticks, rising to approximately 58k.
* **May 9 - May 23:** The price declines sharply again, with predominantly red candlesticks, falling to approximately 47k.
### Key Observations
* **Volatility:** The price exhibits significant volatility throughout the period, with alternating periods of increase and decrease.
* **Peak:** The highest price point is reached around April 11, at approximately 64k.
* **Trough:** The lowest price point is reached around May 23, at approximately 47k.
* **Sharp Decline:** There are two notable sharp declines: one between April 11 and April 25, and another between May 9 and May 23.
### Interpretation
The candlestick chart illustrates the price dynamics of an asset over a two-month period. The alternating green and red candlesticks indicate daily price fluctuations, while the overall trend reveals periods of growth and decline. The sharp declines suggest potential market corrections or negative news events impacting the asset's value. The volatility observed throughout the period indicates a degree of risk associated with this asset. The chart suggests that the asset experienced a significant correction in late April and mid-May, after reaching a peak in early April.
</details>
Figure 11: $\blacktriangledown 22\%$ BTC/USD [14/04/2021-25/04/2021]
The day before its IPO, BTC/USD increased by almost 7%, before losing more than 20% ten days later. The weak form assumes that all historical price information is already reflected in the current price. This form challenges technical analysis, which specializes precisely in analyzing past returns. These analyses are widely shared on social media, due to their ease of implementation, and attract a (too?) proselytizing community. The idea is to use indicators mainly based on past fluctuations to make future predictions. Among the usual indicators (according to the TA-Lib library, considered a reference) are: RSI (Relative Strength Index), SMA (Simple Moving Average), BBANDS (Bollinger Bands). Let us check, for example, whether a "mean-reversion" strategy would be more effective than a simple "hold" (buy-sell only once) and more effective than a random strategy by backtesting these strategies on 2021. If not, we could conjecture that, over the entire year of 2021, it was useless to use a "mean-reversion" strategy (which assumes that when the current price is too "far" from the moving average (SMA), the price will return to its "mean")). This may also give us an indication about the market efficiency form.
We will base our analysis on a set $\Omega$ of crypto-assets. For each element in $\Omega$ , we will test three strategies: mean-reversion, hold, and random. We assume short-selling is allowed. Let $P_{t}$ be the price at time $t$ , $M_{t}(n)$ the moving average at time $t$ with a window of $n$ days, $\omega_{i}$ the $i^{th}$ element of $\Omega$ , and $râ[0,100]$ a percentage around $M_{t}(n)$ indicating the threshold at which we open/close a position. The mean-reversion strategy will be constructed as follows: if $P_{t}>M_{t}(n)+(\frac{M_{t}(n)Ă r}{100})$ , then sell $\omega_{i}$ at price $P_{t}$ ; if $P_{t}<M_{t}(n)-(\frac{M_{t}(n)Ă r}{100})$ , then buy $\omega_{i}$ at price $P_{t}$ , with $t$ ranging from [01/01/2021, 31/12/2021].
The hold strategy will be constructed as follows: if $t=01/01/2021$ , then buy $\omega_{i}$ at price $P_{t}$ ; if $t=31/12/2021$ , then sell $\omega_{i}$ at price $P_{t}$ .
The random strategy will be constructed as follows: generate a signal $Sâ[\text{buy, sell, hold}]$ with $P(S=\text{buy})=P(S=\text{sell})=P(S=\text{hold})=\frac{1}{3}$ . For each $\omega_{i}$ and for each $t$ , if $S=\text{"buy"}$ we buy $\omega_{i}$ at price $P_{t}$ , if $S=\text{"sell"}$ we sell $\omega_{i}$ at price $P_{t}$ , if $S=\text{"hold"}$ we do nothing.
Thus, we create a Python function isSMABetter( $\Omega,n,r$ ) that takes as parameters $\Omega$ (the set of crypto-assets), $r$ (the percentage for the SMA thresholds), and $n$ (the window size in days for the SMA), and returns True if the average SMA returns of $\omega_{i}$ are greater than the average returns of the hold strategy and (strictly) the random strategy in at least 50% of the cases, and False otherwise.
We only consider daily returns. Indeed, how could we backtest a strategy that only opens positions? We thus place ourselves in a short-term trading scale for each trade, which is consistent with the chartist approach (otherwise, we would prefer a passive investment strategy that requires almost no analysis).
The results of isSMABetter( $\Omega,n,r$ ), whose code is in Appendix B, are as follows:
| 116 | 1179 | -484 | -4 | 50 | 20 | 0.00 | False |
| --- | --- | --- | --- | --- | --- | --- | --- |
Table 2: Results of isSMABetter( $\Omega,n,r$ )
It appears that in 2021, among the 116 crypto-assets tested, it was more optimal to have a passive strategy or, at worst, a random strategy, rather than using the moving average in an attempt to generate profits with a day-trading approach (speculation aiming to make a profit within the same day of a market order execution), since the average return obtained with the SMA strategy was the lowest among the three (-484%), and strictly no crypto-asset (0%) showed any interest in being traded with an SMA strategy.
We can conjecture that the cryptocurrency market efficiency form is at least weak, and possibly semi-strong, depending on the crypto-assets and periods, but hardly strong.
2.1.2 Random Walk and Martingale
In almost all the literature ([Lardic and Mignon, 2006], [Jovanovic, 2009] âŠ), a random walk is modeled by two elements: the previous observation and white noise. The literature explains that a price can be modeled as: $P_{t+1}=P_{t}+\varepsilon_{t+1}$ , with $\varepsilon=\{\varepsilon_{t},tâ N\}$ being white noise. This implies that the best (and only) way to predict the price of an asset is by using its current price.
We will perform a Dickey-Fuller test [Dickey and Fuller, 1979] on each element of a set of assets $\Omega$ with a significance level of $\alpha=5\%$ . We define a Python function getRandomPerc( $\Omega$ ) that takes as input a set of crypto-assets $\Omega$ and returns the percentage of assets in that set that appear to follow a random walk, that is, for which we do not reject the null hypothesis "the time series is non-stationary". The result of getRandomPerc( $\Omega$ ), whose code is provided in Appendix F, returns 69 %. It seems that more than half of the cryptocurrencies follow a random walk.
There is often confusion between efficiency and random walk. Indeed, when reading the Wikipedia page on the efficient market hypothesis, one might think that an efficient market necessarily implies prices following a random walk. However, this is false. The market is not necessarily inefficient if prices do not follow a random walk because, as [Lardic and Mignon, 2006] states, "It suffices, for example, that the hypothesis of risk neutrality is not satisfied, or that individualsâ utility functions are not separable and additive [LeRoy, 1982], meaning that it is impossible to separate consumption and investment decisions."
Many studies show that cryptocurrencies (most studies focus on Bitcoin) do not follow a random walk ([Palamalai et al., 2021], [Aggarwal, 2019] âŠ). However, these studies mainly rely on the very restrictive assumption of autocorrelation, and conclude that the Bitcoin market is not efficient. Samuelson [Samuelson, 2016] already addressed this problem in his time and proposed a modification to the random walk hypothesis: the martingale model.
This model is less restrictive than the random walk model because it imposes no condition on the autocorrelation of residuals. Very similar to the previous model, a price process $P_{t}$ follows a martingale if: $E[P_{t+1}|I_{t}]=P_{t}$ , where $P_{t}$ is the price at time $t$ and $I_{t}$ is the information set at time $t$ . Thus, under the martingale model, the current price is the sole (and best) predictor of the next price, even if there are successive dependencies in returns.
As previously noted, an analysis of most cryptocurrencies (the most widely used) shows that the returns of more than half of the assets seem to follow a random walk. With the martingale model, one might be tempted to assert that the crypto market is efficient.
However, many studies have investigated the relationship between Bitcoin and the martingale model ([Zargar and Kumar, 2019], [Nadarajah and Chu, 2017] âŠ) and conclude that the Bitcoin market is not efficient, mainly due to endogenous factors of an emerging and immature market, and the absence of traders relying on fundamental value.
It is difficult to extend this conclusion to the entire cryptocurrency market. However, we know that a study showing market inefficiency between 2012 and 2015 is not highly relevant for 2022, as much has happened since then (especially for Bitcoin).
Thus, we highlight the application of Loâs adaptive market hypothesis [Lo, 2004] to Bitcoin through a study [Khuntia and Pattanayak, 2018], which explains that efficiency improves over time. This study particularly well summarizes the evolution of crypto market returns: episodes of efficiency and inefficiency, creating opportunities for arbitrage and above-average returns, but an impossibility to predict these opportunities systematically or mathematically.
2.1.3 Cryptocurrencies and Fundamental Value
As explained by [Delcey et al., 2017], there are two definitions of an efficient market. Famaâs definition implies that the randomness of a price is explained by the fact that prices converge toward the fundamental value. Samuelsonâs definition implies that unpredictable price variations are simply the result of competition among investors, regardless of fundamental value. This raises the following question: What is a fundamental value for a cryptocurrency?
According to [Biais et al., 2020], the fundamental value of Bitcoin (and by extension most other cryptocurrencies, as they hardly differ in their characteristics) lies in its stream of net transactional benefits, which depend on its future prices. These transactional benefits may, for instance, represent the ability to exchange money in an unstable economic and financial system (such as in Venezuela or Zimbabwe), or when exchanges are blocked or heavily taxed.
To determine the net value, [Biais et al., 2020] consider various costs: limited convertibility, transaction fees from brokers, mining costs, and crash risk. They thus provide a definition of Bitcoinâs fundamental value (and technically of other cryptocurrencies) and answer the question of whether a cryptocurrency can have a fundamental value.
Obviously, this value differs depending on the cryptocurrency. For instance, if there is a strong demand for privacy in transactions, Monero (XMR) would dominate in volume, since it uses a private blockchain by default (making transactions untraceable, unlike Bitcoin where the blockchain is public and all transactions are identifiable).
However, the very idea that Bitcoin has a fundamental value is debated both in the media and academic literature. According to [Yermack, 2013], cryptocurrencies have no fundamental value because, if they did, there would be no incentive to mine cryptocurrency. According to [Hanley, 2013], Bitcoinâs value merely floats relative to other currencies as a market estimate without any fundamental value to support it. [Woo et al., 2013] suggests Bitcoin may have a certain fair value because of its features similar to fiat currencies (means of exchange and store of value), but without any other underlying basis.
[Hayes, 2015] links the importance of Bitcoinâs mining network to the dependency of altcoin holders on Bitcoin, given that most altcoins must be exchanged into Bitcoin before being converted into fiat currency for real-world use. Furthermore, [Garcia et al., 2014] highlights the importance of mining production costs in the fundamental value of cryptocurrencies, as it provides a kind of âfloor valueâ.
Cryptocurrencies are often criticized for being "backed by nothing", a misconception regarding the role of money in an economy. For example, according to the U.S. Federal Reserve, â Federal Reserve notes are not redeemable in gold, silver, or any other commodity. Federal Reserve notes have not been redeemable in gold since January 30, 1934, when the Congress amended Section 16 of the Federal Reserve Act to read: "The said [Federal Reserve] notes shall be obligations of the United StatesâŠ.They shall be redeemed in lawful money on demand at the Treasury Department of the United States, in the city of Washington, District of Columbia, or at any Federal Reserve bank." â
Beyond the purely economic definition of value (utility and scarcity), for which Bitcoin qualifies (its utility lying in being an alternative to the centralized financial system, and its scarcity from the 21 million unit limit and diminishing accessibility over time), there is also a subjective characteristic to this value.
We highlight two relevant elements: network value and safe-haven value. According to Metcalfeâs law [Metcalfe, 1995], although nuanced [Odlyzko and Tilly, 2005], the value of a network is proportional to the square of the number of its users: a single fax machine is useless, but the value of each fax increases with the total number of machines in the network. One could thus infer a similar characteristic for cryptocurrencies.
According to [Baur and McDermott, 2010], a safe-haven asset can be defined as one that is negatively correlated with equities during crises. Gold is often a reference point. Let us verify this. We cannot directly compare superimposed charts due to vastly different magnitudes:
<details>
<summary>extracted/6391907/images/cor1.png Details</summary>

### Visual Description
## Line Chart: GOLD/USD, BTC/SD, and S&P500 Performance (2015-2022)
### Overview
The image is a line chart comparing the performance of GOLD/USD, BTC/SD (Bitcoin), and the S&P500 index from 2015 to 2022. The chart displays the price trends of these three assets over time, with the y-axis representing price in thousands (k) and the x-axis representing the year.
### Components/Axes
* **X-axis:** Represents time, labeled with years from 2015 to 2022.
* **Y-axis:** Represents price in thousands (k), with markers at 0, 10k, 20k, 30k, 40k, 50k, 60k, and 70k.
* **Legend (Top-Right):**
* Blue line: GOLD/USD
* Red line: BTC/SD
* Green line: S&P500
### Detailed Analysis
* **GOLD/USD (Blue Line):**
* Trend: Relatively stable with a slight upward trend.
* Approximate Values: Starts around 1.1k in 2015 and ends around 1.8k in 2022.
* **BTC/SD (Red Line):**
* Trend: Highly volatile with significant price increases, especially after 2020.
* Approximate Values: Starts around 0.3k in 2015, experiences a spike to approximately 18k in early 2018, then fluctuates between 6k and 12k until 2020. After 2020, it rises dramatically, peaking at approximately 65k in late 2021, before declining to around 38k in 2022.
* **S&P500 (Green Line):**
* Trend: Steady upward trend.
* Approximate Values: Starts around 2.1k in 2015 and ends around 4.0k in 2022.
### Key Observations
* BTC/SD shows the most significant price fluctuations and overall growth compared to GOLD/USD and S&P500.
* GOLD/USD exhibits the least volatility and the smallest overall growth.
* S&P500 demonstrates a consistent, moderate growth rate.
* The period after 2020 shows a significant divergence in performance, with BTC/SD experiencing exponential growth and subsequent decline.
### Interpretation
The chart illustrates the differing investment profiles of gold, Bitcoin, and the S&P500. Bitcoin's high volatility and potential for high returns are evident, while gold offers stability and lower returns. The S&P500 provides a balance between risk and return, with steady growth over the period. The dramatic rise and fall of Bitcoin after 2020 highlights the speculative nature of cryptocurrency investments. The data suggests that Bitcoin's performance is largely independent of the other two assets, while gold and the S&P500 show a more consistent, albeit less dramatic, growth pattern.
</details>
Figure 12: Correlation between BTC/USD, GOLD/USD, and S&P500
Thus, we will separately analyze the correlation between S&P500 crashes and BTC/USD prices:
<details>
<summary>extracted/6391907/images/sp.png Details</summary>

### Visual Description
## Line Chart: Time Series Data
### Overview
The image is a line chart displaying a time series of data from 2015 to 2022. The y-axis represents a numerical value ranging from approximately 2000 to 4500, while the x-axis represents time in years. The single blue line shows the trend of the data over time.
### Components/Axes
* **X-axis:** Years from 2015 to 2022.
* **Y-axis:** Numerical values ranging from 2000 to 4500, with increments of 500.
* **Data Series:** A single blue line representing the data.
### Detailed Analysis
* **2015:** The blue line starts at approximately 2000.
* **2016:** The line fluctuates around 2000, with a slight dip below 2000.
* **2017:** The line shows an upward trend, reaching approximately 2500.
* **2018:** The upward trend continues, reaching approximately 2800.
* **2019:** The line fluctuates around 3000, with a dip towards the end of the year.
* **2020:** A significant drop occurs in early 2020, reaching a low of approximately 2250, followed by a sharp recovery.
* **2021:** The line shows a strong upward trend, reaching approximately 4250.
* **2022:** The line fluctuates around 4500, with a slight downward trend towards the end of the year.
### Key Observations
* The data shows a general upward trend from 2015 to 2022, with a significant drop in early 2020.
* The most substantial growth occurs between 2020 and 2021.
* The data fluctuates significantly in 2022.
### Interpretation
The line chart likely represents a stock market index or similar financial data. The upward trend suggests growth over the period, while the drop in 2020 likely corresponds to a significant economic event, such as the COVID-19 pandemic. The fluctuations in 2022 could indicate market volatility or uncertainty.
</details>
Figure 13: S&P500 over the period available with BTC/USD
We notice graphical correlations during several crash periods:
- Early 2018
- Late 2019
- Early 2020
- Early 2022
These correlations are weaker, or even negative, with gold:
<details>
<summary>extracted/6391907/images/gold.png Details</summary>

### Visual Description
## Line Chart: Time Series Data
### Overview
The image is a line chart displaying time series data. The x-axis represents time, spanning from 2015 to 2022. The y-axis represents a numerical value, ranging from 1000 to 2000. A single blue line plots the data points over time, showing fluctuations and trends.
### Components/Axes
* **X-axis:**
* Label: Years
* Scale: 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
* **Y-axis:**
* Label: Numerical Value (unspecified units)
* Scale: 1000, 1200, 1400, 1600, 1800, 2000
* **Data Series:**
* Color: Blue
* Trend: Fluctuating with an overall upward trend, especially pronounced after 2019.
### Detailed Analysis
* **2015:** Starts around 1200, fluctuates down to approximately 1100, then back up.
* **2016:** Begins around 1200, rises to approximately 1350, then declines.
* **2017:** Starts around 1250, fluctuates around 1300.
* **2018:** Remains relatively stable, fluctuating around 1300.
* **2019:** Starts around 1300, ends around 1400.
* **2020:** Shows a significant upward trend, rising from approximately 1400 to 1800.
* **2021:** Peaks around 1950-2000, then declines to approximately 1700-1800.
* **2022:** Fluctuates around 1800-1900, ending near 1900.
### Key Observations
* The data shows a period of relative stability between 2017 and 2019.
* A significant increase occurs in 2020.
* The highest point is reached in 2021, followed by a decline and stabilization.
### Interpretation
The line chart illustrates the trend of a numerical value over time. The period from 2015 to 2019 shows moderate fluctuations, while 2020 marks a significant turning point with a substantial increase. The peak in 2021 is followed by a correction, and the value stabilizes at a higher level in 2022 compared to the pre-2020 period. This suggests a potential shift in the underlying factors influencing the numerical value around 2020.
</details>
Figure 14: GOLD/USD over the period available with BTC/USD
Let us graphically check the correlation of daily returns:
<details>
<summary>extracted/6391907/images/cor-btc-sp.png Details</summary>

### Visual Description
## Line Chart: BTC/SD vs. S&P500
### Overview
The image is a line chart comparing the fluctuations of BTC/SD (Bitcoin Standard Deviation) and S&P500 over time, from 2015 to 2022. The chart displays the volatility of BTC/SD relative to the S&P500, with BTC/SD showing significantly higher fluctuations.
### Components/Axes
* **X-axis:** Represents time, labeled with years from 2015 to 2022.
* **Y-axis:** Represents the value, ranging from -0.4 to 0.2, with increments of 0.1.
* **Legend (Top-Right):**
* Blue line: BTC/SD
* Red line: S&P500
### Detailed Analysis
* **BTC/SD (Blue Line):** The BTC/SD line shows high volatility with frequent and large swings both above and below the zero line.
* From 2015 to early 2018, the fluctuations are generally within the range of -0.1 to 0.1, with occasional spikes.
* In 2018, the volatility increases, with peaks reaching above 0.2 and troughs going below -0.2.
* A significant drop occurs around 2020, reaching approximately -0.4.
* After 2020, the volatility remains high, but the range of fluctuations seems to narrow slightly compared to 2018.
* **S&P500 (Red Line):** The S&P500 line shows relatively low volatility, staying close to the zero line throughout the entire period.
* The line fluctuates slightly around zero, with occasional deviations.
* Around 2020, there is a noticeable dip, but it is much less severe than the drop observed in the BTC/SD line.
### Key Observations
* **Volatility:** BTC/SD is significantly more volatile than the S&P500.
* **Correlation:** While both lines show some dips around 2020, the magnitude of the changes is vastly different, suggesting a weak correlation.
* **Range:** The S&P500 remains within a narrow range close to zero, while BTC/SD experiences much wider swings.
### Interpretation
The chart illustrates the higher risk and volatility associated with Bitcoin compared to the S&P500. The S&P500, representing a broader market index, exhibits more stability. The large fluctuations in BTC/SD suggest that it is more susceptible to market events and investor sentiment. The relatively stable S&P500 indicates a more diversified and less volatile investment. The data suggests that while both assets experienced a dip around 2020, the impact on Bitcoin was far more pronounced, highlighting its higher risk profile.
</details>
Figure 15: Correlation between BTC/USD and S&P500 (daily returns)
<details>
<summary>extracted/6391907/images/cor-gold-sp.png Details</summary>

### Visual Description
## Time Series Chart: GOLD/USD vs. S&P500
### Overview
The image is a time series chart comparing the fluctuations of GOLD/USD and S&P500 from 2015 to 2022. The chart displays the daily changes of the two assets over time.
### Components/Axes
* **X-axis:** Time, labeled with years from 2015 to 2022.
* **Y-axis:** Values ranging from -0.1 to 0.1, with increments of 0.05.
* **Legend (Top-Right):**
* Blue line: GOLD/USD
* Red line: S&P500
### Detailed Analysis
* **GOLD/USD (Blue Line):**
* General Trend: Fluctuates around 0, showing volatility over time.
* 2015-2019: Relatively stable fluctuations between approximately -0.02 and 0.02.
* 2020: Experiences a significant drop to approximately -0.07, followed by a sharp recovery.
* 2021-2022: Continues to fluctuate, with peaks and valleys generally within the -0.04 to 0.04 range.
* **S&P500 (Red Line):**
* General Trend: Similar to GOLD/USD, fluctuates around 0, indicating volatility.
* 2015-2019: Fluctuations are generally between -0.02 and 0.02.
* 2020: Shows a dramatic drop to approximately -0.1, followed by a rapid spike to around 0.09.
* 2021-2022: Continues to fluctuate, with peaks and valleys generally within the -0.03 to 0.03 range.
### Key Observations
* Both GOLD/USD and S&P500 exhibit significant volatility, particularly around 2020.
* The S&P500 shows a more pronounced spike in volatility in 2020 compared to GOLD/USD.
* Both assets generally fluctuate within a narrow range, but experience occasional extreme deviations.
### Interpretation
The chart illustrates the daily changes of GOLD/USD and S&P500 over a seven-year period. The data suggests that both assets experienced increased volatility around 2020, likely due to global events such as the COVID-19 pandemic. The S&P500 appears to have been more significantly impacted by these events, as evidenced by the larger spike in volatility compared to GOLD/USD. The fluctuations in both assets indicate the dynamic nature of financial markets and the potential for both gains and losses. The data does not provide information about the underlying causes of the fluctuations, but it highlights the importance of monitoring market trends and managing risk.
</details>
Figure 16: Correlation between GOLD/USD and S&P500 (daily returns)
A numerical analysis of the correlation of daily returns over the entire period shows 16% for Bitcoin with the S&P500 and 5% for gold with the S&P500. Bitcoin does not appear to be a better safe-haven asset than gold, which is confirmed by other studies ([Smales, 2019], [Bouri et al., 2017]).
2.2 From Louis Bachelier to Contemporary Models
EugĂšne Fama is not the inventor of the idea of a random market. We can trace it back to 1863, when Jules Regnault [Regnault, 1863] proposed a model of randomly volatile markets. Then, in 1900, Bachelier [Bachelier, 1900] formalized it. It was only from the 1930s that the random aspect of the market began to be considered, notably in the United States with the emergence of econometrics, and then, from the 1960s, financial economics in the United States started to connect the model to economic theory, giving rise to the theory of informational efficiency of financial markets. However, this theory, although constituting the foundation of the random walk model, would never achieve unanimous acceptance. In this subsection, we will present the theoretical models that have explained the variations of financial assets since 1900, from Louis Bachelierâs theory of speculation to the present day.
2.2.1 Modeling of Traditional Finance
It is important to understand that the cryptocurrency market is not disconnected from traditional financial markets in its creation.
- The Louis Bachelier Model Bachelier is a pioneer of modern finance in the sense that he was the first to use Brownian motion in modeling stock prices, five years before [Einstein, 1956]. From his model, the Wiener process [Wiener, 1976] would later be formalized. The model simply explains that the stock market follows a Gaussian distribution. Of course, such a model today would not be considered rigorous, but for its time, it was already remarkably close to a correct model. Indeed, Brownian motion applied to stock price fluctuations is based on questionable assumptions: Markov chain (memoryless process), stationarity (constant mean and standard deviation), and normal distribution. We can clearly see, for example, for the four largest cryptocurrencies, that the distribution of daily returns is not really Gaussian:
<details>
<summary>extracted/6391907/images/dist-btc.png Details</summary>

### Visual Description
## Histogram: Distribution Plot
### Overview
The image is a histogram overlaid with a probability density function (PDF). The histogram consists of vertical bars representing the frequency distribution of data, while the PDF is a smooth curve that approximates the distribution. The data appears to be centered around zero.
### Components/Axes
* **X-axis:** Ranges from approximately -0.3 to 0.25, with tick marks at -0.3, -0.2, -0.1, 0, 0.1, and 0.2.
* **Y-axis:** Ranges from 0 to 0.004, with tick marks at 0, 0.0005, 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, and 0.004.
* **Histogram:** The histogram is represented by gray vertical bars. The height of each bar indicates the frequency of data points within that bin.
* **PDF:** A black curve is overlaid on the histogram, representing the probability density function. It approximates the shape of the histogram.
### Detailed Analysis
* **Histogram:** The histogram shows a high concentration of data points around zero. The frequency decreases as you move away from zero in either direction. The bars are densest and tallest near zero, indicating a high frequency of values close to zero.
* **PDF:** The PDF curve is centered around zero and has a bell-like shape, suggesting a normal distribution. The peak of the curve is at zero, corresponding to the highest frequency in the histogram. The curve tapers off symmetrically on both sides.
### Key Observations
* The data is heavily concentrated around zero.
* The distribution appears to be approximately normal.
* There are fewer data points in the tails of the distribution (i.e., far from zero).
### Interpretation
The histogram and PDF suggest that the data is normally distributed with a mean close to zero. The high concentration of data points around zero indicates that values close to zero are much more common than values far from zero. This type of distribution is often seen in situations where values are expected to cluster around a central value, such as measurement errors or random fluctuations around an average. The symmetry of the distribution suggests that positive and negative deviations from zero are equally likely.
</details>
Figure 17: Distribution of daily returns for BTC/USD
<details>
<summary>extracted/6391907/images/dist-eth.png Details</summary>

### Visual Description
## Histogram with Normal Distribution Overlay
### Overview
The image is a histogram overlaid with a normal distribution curve. The histogram consists of vertical lines representing the frequency of data points within specific bins. The normal distribution curve is a smooth line that approximates the distribution of the data.
### Components/Axes
* **X-axis:** Ranges from -0.4 to 0.2, with tick marks at -0.4, -0.3, -0.2, -0.1, 0, 0.1, and 0.2.
* **Y-axis:** Ranges from 0 to 0.005, with tick marks at 0, 0.001, 0.002, 0.003, 0.004, and 0.005.
* **Histogram:** Represented by vertical lines. The height of each line indicates the frequency of data points within that bin.
* **Normal Distribution Curve:** A black line that approximates the distribution of the data. It is centered around 0 and has a bell shape.
### Detailed Analysis
* **Histogram:** The vertical lines are concentrated around 0, indicating that most of the data points are clustered around this value. The frequency decreases as you move away from 0 in either direction.
* **Normal Distribution Curve:** The curve is centered around 0 and has a bell shape. It closely follows the distribution of the histogram, indicating that the data is approximately normally distributed.
* **X-Axis Values:**
* -0.4
* -0.3
* -0.2
* -0.1
* 0
* 0.1
* 0.2
* **Y-Axis Values:**
* 0
* 0.001
* 0.002
* 0.003
* 0.004
* 0.005
### Key Observations
* The data is approximately normally distributed, as indicated by the close fit between the histogram and the normal distribution curve.
* The data is centered around 0, with most of the data points clustered around this value.
* There are some outliers, as indicated by the vertical lines that are far away from 0.
### Interpretation
The histogram and normal distribution curve suggest that the data is approximately normally distributed with a mean of 0. This could represent a variety of phenomena, such as measurement errors, random fluctuations, or the distribution of a population around a central value. The outliers could represent unusual events or errors in the data. The image provides a visual representation of the distribution of the data and allows for a quick assessment of its properties.
</details>
Figure 18: Distribution of daily returns for ETH/USD
<details>
<summary>extracted/6391907/images/dist-ltc.png Details</summary>

### Visual Description
## Histogram: Distribution Plot
### Overview
The image is a histogram displaying the distribution of a dataset. The histogram consists of vertical bars representing the frequency of data points within specific ranges, overlaid with a black curve that approximates the distribution. The data appears to be centered around zero, with a concentration of values near the center and tapering off towards the extremes.
### Components/Axes
* **X-axis:** Ranges from -0.4 to 0.6, with tick marks at -0.4, -0.2, 0, 0.2, 0.4, and 0.6. The x-axis represents the values of the data being distributed.
* **Y-axis:** Ranges from 0 to 0.004, with tick marks at 0, 0.0005, 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.0035, and 0.004. The y-axis represents the frequency or density of the data.
* **Bars:** Gray vertical bars represent the frequency of data points within specific ranges along the x-axis. The height of each bar corresponds to the frequency of data within that range.
* **Curve:** A black curve is overlaid on the histogram, approximating the distribution of the data. It appears to be a normal distribution curve, centered around zero.
### Detailed Analysis
* The highest frequency of data points occurs around x = 0. The bars are densest and tallest in this region.
* The frequency of data points decreases as you move away from x = 0 in either direction. The bars become shorter and sparser.
* The black curve closely follows the shape of the histogram, indicating a good fit for the distribution.
* The distribution appears to be roughly symmetrical around x = 0.
* The maximum value of the distribution is approximately 0.003.
### Key Observations
* The data is heavily concentrated around zero.
* The distribution is approximately normal.
* There are few data points beyond x = -0.2 and x = 0.2.
### Interpretation
The histogram suggests that the underlying data is centered around zero and follows a roughly normal distribution. This could represent a variety of phenomena, such as measurement errors, random fluctuations, or the distribution of a variable around its mean. The concentration of data around zero indicates that values close to zero are more common than values further away. The shape of the distribution can provide insights into the nature of the data and the processes that generate it.
</details>
Figure 19: Distribution of daily returns for LTC/USD
<details>
<summary>extracted/6391907/images/dist-xrp.png Details</summary>

### Visual Description
## Histogram: Distribution Plot
### Overview
The image is a histogram overlaid with a probability density function (PDF). The histogram consists of vertical bars representing the frequency distribution of data, while the PDF is a smooth curve that approximates the distribution. The data appears to be centered around zero.
### Components/Axes
* **X-axis:** Ranges from -0.4 to 0.8, with tick marks at -0.4, -0.2, 0, 0.2, 0.4, 0.6, and 0.8. The x-axis likely represents the values of the variable being measured.
* **Y-axis:** Ranges from 0 to 0.005, with tick marks at 0, 0.001, 0.002, 0.003, 0.004, and 0.005. The y-axis represents the frequency or density of the data.
* **Histogram:** A series of vertical bars, with the highest concentration of bars around 0.
* **PDF Curve:** A smooth, bell-shaped curve overlaid on the histogram, centered around 0.
### Detailed Analysis
* **Histogram Bars:** The bars are concentrated around 0, indicating that most of the data points are close to 0. The height of the bars varies, with the tallest bar reaching approximately 0.005.
* **PDF Curve:** The curve closely follows the shape of the histogram, indicating a good fit. The peak of the curve is at 0, and it gradually decreases as it moves away from 0 in both directions.
### Key Observations
* The data is heavily concentrated around 0.
* The distribution appears to be approximately normal, as suggested by the bell-shaped PDF curve.
* There are some data points that are further away from 0, but they are relatively infrequent.
### Interpretation
The histogram and PDF suggest that the data is centered around zero and follows a roughly normal distribution. This could represent a variety of phenomena, such as measurement errors, fluctuations around a target value, or the distribution of residuals in a statistical model. The concentration of data around zero suggests that the underlying process is stable and well-controlled. The presence of some data points further away from zero indicates that there are occasional deviations from the norm, but they are relatively rare.
</details>
Figure 20: Distribution of daily returns for XRP/USD
It might be more appropriate to refer to a Lévy law or an $\alpha$ -stable distribution.
- The Gordon-Shapiro Model The Gordon-Shapiro model [Gordon and Shapiro, 1956] is very well-known in finance and provides a very simple formula to model the price of a stock:
$$
P_{0}=\frac{D_{1}}{k-g} \tag{1}
$$
where $P_{0}$ is the theoretical value of the stock, $D_{1}$ the anticipated dividend for the first period, $k$ the expected return rate for the shareholder, and $g$ the growth rate of the gross earnings per share. The first thing to note is that this model is useless for the crypto market: there are no dividends. Therefore, this model can be dismissed, even though it is attractive.
- Contemporary Models With the development of quantitative finance and derivative pricing, many models have emerged, one of the most famous being the Black & Scholes model [Black and Scholes, 2019]. However, as with the binomial model (Cox, Ross & Rubinstein model), the problem of constant volatility of the underlying assets appeared. Indeed, in the Black & Scholes formula:
$$
C=S_{t}N(d_{1})-Ke^{-rt}N(d_{2}) \tag{2}
$$
where:
$$
d_{1}=\frac{\ln\frac{S_{t}}{K}+(r+\frac{\sigma^{2}}{2})t}{\sigma\sqrt{t}} \tag{3}
$$
$$
d_{2}=d_{1}-\sigma\sqrt{t} \tag{4}
$$
with: $C$ the price of the call option $P$ the stock price $K$ the strike price $r$ the risk-free interest rate $t$ the time in years to maturity $N$ a normal distribution $\sigma$ the volatility of the underlying asset We notice that volatility is considered constant. This led to the development of stochastic volatility models, treating the volatility of the underlying as a random process. As explained, for instance, by [Mantegna and Stanley, 1999], the price of an asset can be characterized by a standard geometric Brownian motion:
$$
dS_{t}=\mu S_{t}dt+\sigma S_{t}dW_{t} \tag{5}
$$
with: $\mu$ the drift (often negligible) $\sigma$ constant volatility $dW_{t}\hookrightarrow N(0,1)$ an increment of Brownian motion then replacing $\sigma$ by a process $\nu_{t}$ . This is indeed how the Heston model [Heston, 1993] is built, one of the most well-known stochastic volatility models. Its formulas are:
$$
dS_{t}=rS_{t}dt+\sqrt{V_{t}}S_{t}dW_{1t} \tag{6}
$$
with $V_{t}$ the instantaneous variance:
$$
dV_{t}=\kappa(\theta-V_{t})dt+\sigma\sqrt{V_{t}}dW_{2t} \tag{7}
$$
where: $S_{t}$ the asset price at time $t$ $r$ the risk-free interest rate $\sqrt{V_{t}}$ the volatility (standard deviation) of the price $\sigma$ the volatility of the volatility (i.e., of $\sqrt{V_{t}}$ ) $\theta$ the long-term variance $\kappa$ the reversion rate to $\theta$ $dt$ an infinitesimally small time increment $W_{1t}$ the Brownian motion for the asset price $W_{2t}$ the Brownian motion for the variance of the asset price with the property that, for Brownian motions, $W_{0}=0$ , the $W_{t}$ are independent, and $W_{t}$ is continuous in $t$ . This model seems well suited for modeling the price of cryptocurrencies. Indeed, [Kachnowski, 2020] explains that an adaptation of the Heston model to Bitcoin improves the accuracy of predictions over time windows ranging from 7 days to 2 months. However, as shown by [Gatheral et al., 2018], the log-volatility is not actually a classic Brownian motion but rather a fractional Brownian motion, as in the Fractional Stochastic Volatility Model by [Comte et al., 2012], but with a Hurst exponent of 0.1 (and not 0.5 as in [Comte et al., 2012], who did not take into account the rough aspect of volatility).
2.2.2 Modeling Crypto-Finance
- Quantitative Theory of (Crypto)Currency As we know [Fisher, 2006],
$$
MV=PY \tag{8}
$$
where: $M$ is the money supply $V$ is the velocity of money $P$ is the price level $Y$ is the output of the economy Letâs adapt this model to cryptocurrencies. For $M$ , it is simple: it is constant at 21 million. However, we can already anticipate that $M$ tends towards 0. Indeed, 21 million is the maximum number of Bitcoins that can be mined. Once mined, Bitcoins can disappear for several reasons: lost passwords, hacking, computer errors, etc. For $V$ , it is more complicated. We would need to differentiate between economically meaningful transactions and meaningless ones. And this is very difficult, even though all transactions are listed on the Blockchain, the reasons behind them are not. Thus, we cannot distinguish "real" transactions from "fake" ones. For $P$ , it refers to the goods and services that can be purchased with Bitcoin. In November 2020, the Venezuelan branch of Pizza Hut accepted Bitcoin. On that day, you could buy around 1,800 pizzas (worth approximately 10 USD each) with one Bitcoin. Today, you could buy around 4,000 pizzas with one Bitcoin. Thus, $P$ has been continuously falling for BTC/USD. For $Y$ , it represents the amount of goods and services available for purchase and sale. We can admit that very few goods and services are currently bought and sold with cryptocurrencies. Thus, over time, cryptocurrencies are expected to depreciate. Indeed, we know that the number of Bitcoins in circulation initially increases (then will decrease), which should induce inflation. However, the opposite is observed. If $Y$ is exogenous to Bitcoin (goods and services offered are not really dependent on Bitcoinâs price), and $M$ is constant, then $V$ will influence $P$ . In this case, two scenarios arise: if Bitcoin (same reasoning for other cryptocurrencies) is merely a means of exchange without any fundamental value, $V$ will increase, as it will become just another payment option for households. If Bitcoin is rather seen as a store of value, with a fundamental value, then households will invest and hold their Bitcoins, causing $V$ to decrease, which will raise $P$ . Studies, including [Pernice et al., 2020], show a link between price and velocity in cryptocurrencies.
- Other Models of the Crypto Market [Cretarola and FigĂ -Talamanca, 2018] propose modeling the crypto market by the interest it generates. They explore the link between Bitcoinâs price behavior and investor attention in the network. They conclude that the attention index impacts Bitcoinâs price through dependence of the drift and diffusion coefficients and potential correlation between the sources of randomness represented by Brownian motions. [Hou et al., 2020] propose a model for pricing crypto options, SVCJ (stochastic volatility with a correlated jump), similar to [Pascucci and Palomba,], and compare it with the cojump model of [Bandi and Reno, 2016]. It is very likely that the future of cryptocurrency price modeling will develop towards derivative products.
2.3 Time Series Studies and Analyses
We are still considering the case where the crypto market is efficient. Thus, it is impossible to predict its price movements, regardless of the methods employed. However, these methods are still widely used by both retail and professional investors. Therefore, we will examine these methods to understand whether they can be effective in prediction. Nevertheless, we will see that it is sometimes difficult to answer this question with a simple yes or no.
2.3.1 Fundamental Analysis
To perform fundamental analysis on a company, there are a number of well-established methods (financial ratios, EBITDA, cash flows, etc.). For cryptocurrencies, there are not really established methods. We have therefore chosen 5 themes. We cannot develop a full analysis due to the lack of data, but these indicators can, in our opinion, allow a good fundamental analysis:
- Supply Measures:
- Is the number of coins fixed in advance?
- How many coins have been mined, and how many remain?
- What is the inflation rate?
- What is the coin-to-flow ratio?
- What is the granularity of the coins?
- Value Measures:
- What is the current price?
- What is the current gross market capitalization?
- What is the current net market capitalization (excluding lost coins)?
- What is the interest rate (borrowing cryptocurrencies)?
- What are the yearly high and low points?
- What are the returns by day, week, month, year, and overall?
- Network Activity Measures:
- How many active addresses are there?
- How many new addresses are there?
- How many transactions are there?
- What is the average transaction size?
- Broker Activity Measures:
- What is the total traded volume?
- On how many brokers is the cryptocurrency listed?
- What is the broker flow?
- In which geographical areas do the flows occur?
- Mining Measures:
- What is the consensus mechanism (Proof of Work, Proof of Stake, etc.)?
- What is the governance of the mining network?
- How long does it take to mine a block?
- How are miners rewarded?
- What are the median fees?
- What is the hash rate?
2.3.2 Chartist / Technical Analysis
Technical analysis aims to predict a price using future prices, and more precisely through repetitive patterns or technical indicators. Beyond the SMA tested previously, letâs simply perform a graphical analysis. Letâs take the RSI on BTC/USD:
<details>
<summary>x1.png Details</summary>

### Visual Description
## Chart: Bitcoin/Dollar Price and RSI
### Overview
The image presents a chart of Bitcoin's price against the US Dollar (BTC/USD) along with its Relative Strength Index (RSI). The chart spans a significant period, showing price fluctuations and corresponding RSI values. The price chart uses candlestick representation, while the RSI is displayed as a line graph.
### Components/Axes
* **Title:** Bitcoin / Dollar 1W COINBASE TradingView
* **Y-Axis (Left):** Price in USD, ranging from 0.00 to 70000.00.
* **Y-Axis (Right):** RSI, ranging from 30.00 to 100.00.
* **X-Axis:** Time (unlabeled, but implied by the context of a price chart).
* **Price Data:** Candlestick chart showing the price of Bitcoin over time.
* **RSI Data:** Line graph showing the Relative Strength Index over time. A yellow moving average line is overlaid on the RSI.
* **Additional Values:**
* 37607.87
* 2087.16
* 39695.03
* 38652.55
### Detailed Analysis
**1. Price Chart (Candlestick):**
* **Trend:** The price of Bitcoin shows significant volatility. It starts at a relatively low value, experiences a major bull run, reaches a peak, and then undergoes a correction.
* **Values:**
* The current price is marked at approximately 38652.55 USD.
* Other values displayed are 37607.87, 2087.16, and 39695.03, which likely represent specific price points or calculations related to the chart.
**2. RSI Chart (Line Graph):**
* **Trend:** The RSI fluctuates between approximately 30 and 90, indicating periods of oversold and overbought conditions.
* **Moving Average:** A yellow moving average line smooths out the RSI fluctuations, providing a clearer view of the overall trend.
* **Levels:** The RSI oscillates, showing peaks and troughs that generally correlate with price movements.
### Key Observations
* **Price Peak:** The Bitcoin price reached a peak of approximately 60000-70000 USD before correcting.
* **RSI Correlation:** The RSI tends to be high when the price is rising rapidly and low when the price is falling.
* **Volatility:** Both the price and RSI exhibit significant volatility throughout the period shown.
### Interpretation
The chart illustrates the historical price action of Bitcoin and its corresponding RSI. The RSI is a momentum indicator used to identify overbought or oversold conditions. When the RSI is above 70, it suggests that Bitcoin is overbought and may be due for a correction. Conversely, when the RSI is below 30, it suggests that Bitcoin is oversold and may be due for a bounce.
The moving average on the RSI helps to filter out noise and identify the underlying trend. The chart suggests that Bitcoin has experienced significant price appreciation followed by a correction, and the RSI reflects these movements. The values displayed (37607.87, 2087.16, 39695.03, and 38652.55) likely represent specific price levels or calculations that are relevant to technical analysis of Bitcoin's price movements.
</details>
Figure 21: RSI Signals for BTC/USD
This indicator tells us that when it is below 30, we should buy, and above 70, we should sell. It is clearly seen that the RSI is useless for a long-term vision: what is the use of selling at 10,000 in 2018 when one could simply buy, hold, and sell at 60,000 in 2022? Now, letâs take another very famous technical indicator: the SAR.
<details>
<summary>x2.png Details</summary>

### Visual Description
## Candlestick Chart: Bitcoin/Dollar Price Over Time
### Overview
The image is a candlestick chart showing the price of Bitcoin against the US Dollar (Bitcoin/Dollar) over time. The chart spans from approximately July 2017 to April 2023, with weekly (1W) intervals. The data source is COINBASE, and the chart is generated using TradingView. The chart displays the open, high, low, and close prices for each week using candlestick representations, with green candles indicating a price increase and red candles indicating a price decrease. A blue dotted line surrounds the price action.
### Components/Axes
* **Title:** Bitcoin / Dollar 1W COINBASE TradingView
* **X-axis:** Time, labeled with months (Juill, Oct, Avr, Mai, Août) and years (2018, 2019, 2020, 2021, 2022).
* **Y-axis:** Price in USD, ranging from -4000.00 to 72000.00, with increments of 4000.00.
* **Candlesticks:** Green candles represent price increases, and red candles represent price decreases.
* **Price Indicators:** 38500.03, 263.02, 38763.05 (likely represent current price, low, and high values, respectively).
* **Current Price:** 38652.70
### Detailed Analysis
* **Overall Trend:** The price of Bitcoin shows significant volatility over the period.
* **2017-2020:** From July 2017 to early 2020, the price fluctuates, generally staying below 16000.00 USD. There are periods of increase and decrease, but no sustained upward trend.
* **2020-2021:** Starting in late 2020, the price begins a significant upward trend, reaching a peak around late 2021.
* **2021-2022:** After the peak in late 2021, the price declines sharply throughout 2022.
* **2022-2023:** From late 2022 into early 2023, the price shows some recovery but remains significantly below its peak.
**Specific Data Points (Approximate):**
* **Late 2017:** Price around 4000.00 USD.
* **Early 2018:** Peak around 16000.00 USD.
* **Late 2018:** Low around 4000.00 USD.
* **Early 2020:** Price around 8000.00 USD.
* **Late 2020:** Price starts to increase significantly from around 12000.00 USD.
* **April 2021:** Price around 60000.00 USD.
* **Late 2021:** Peak around 68000.00 USD.
* **Mid 2022:** Price drops to around 20000.00 USD.
* **April 2023:** Price around 38652.70 USD.
### Key Observations
* **Volatility:** The Bitcoin price is highly volatile, with large swings in both directions.
* **Bull Run:** The period from late 2020 to late 2021 represents a significant bull run.
* **Bear Market:** The period throughout 2022 represents a significant bear market.
* **Recovery:** There is a slight recovery in price in early 2023, but it is not as significant as the previous bull run.
### Interpretation
The chart illustrates the speculative nature of Bitcoin as an asset. The dramatic price increase in 2020-2021, followed by a sharp decline in 2022, highlights the risks associated with investing in cryptocurrencies. The chart suggests that Bitcoin is subject to market sentiment and external factors, leading to periods of rapid growth and decline. The blue dotted line surrounding the price action may represent Bollinger Bands, which are used to measure the volatility of an asset.
</details>
Figure 22: SAR Signals for BTC/USD
This indicator tells us that when the blue dots are below the candlesticks, we should buy, and when they are above, we should sell (first appearance of dots per sequence). The same reasoning applies: what is the point of selling in 2018? These indicators are ultimately only signals for day-trading, with the aim of making quick profits. However, statistics show that more than 70% of day-traders lose money. Yet, they all have access to all available indicators. Technical analysis would therefore seem useless both in the long term and in the short term, a priori. According to [Park and Irwin, 2007], the literature on the subject is inconclusive: some studies are positive, others negative, and others mixed.
2.3.3 Machine Learning
Letâs now check the effectiveness of Machine Learning in predicting cryptocurrency prices. We will not test all algorithms, but only two. The first, Support Vector Machine classification, was introduced by [Cortes and Vapnik, 1995]. It consists of classifying "good" trades from "bad" trades. For this, we create a Python function getAverageAccuracy( $\Omega,n$ ), which takes as parameters $\Omega$ and $n$ the window for technical indicators and returns the average accuracy percentage of our model across all tested cryptocurrencies (over 100). The features considered are: price (OHLC), previous prices, previous returns, SAR, RSI, SMA, ADX, ATR, and 80% training dataset. The function, whose code is in Appendix G, returns 38%. This is low. Here are the confusion matrices for the 4 largest cryptocurrencies (read as "Perfect prediction on the top-left/bottom-right diagonal, inverse prediction on the bottom-left/top-right"):
<details>
<summary>extracted/6391907/images/btc-ml.png Details</summary>

### Visual Description
## Heatmap: Numerical Values
### Overview
The image is a 3x3 heatmap displaying numerical values within each cell. The color intensity corresponds to the magnitude of the number, with lighter colors representing higher values and darker colors representing lower values.
### Components/Axes
* The heatmap consists of a 3x3 grid.
* Each cell contains a numerical value.
* The color gradient ranges from dark blue (low values) to yellow (high values).
### Detailed Analysis
Here's a breakdown of the values and their corresponding colors:
* **Top Row:**
* Left Cell: Value = 9, Color = Light Red/Salmon
* Middle Cell: Value = 10, Color = Orange
* Right Cell: Value = 4, Color = Dark Purple
* **Middle Row:**
* Left Cell: Value = 12, Color = Yellow-Orange
* Middle Cell: Value = 8, Color = Pink
* Right Cell: Value = 3, Color = Dark Blue
* **Bottom Row:**
* Left Cell: Value = 13, Color = Yellow
* Middle Cell: Value = 9, Color = Light Red/Salmon
* Right Cell: Value = 3, Color = Dark Blue
### Key Observations
* The highest value (13) is located in the bottom-left cell and is represented by the lightest color (yellow).
* The lowest values (3) are located in the bottom-right and middle-right cells and are represented by the darkest color (dark blue).
* The values generally decrease from left to right within each row.
* The values are higher in the bottom row compared to the top row.
### Interpretation
The heatmap visually represents the distribution of numerical values across a 3x3 grid. The color gradient allows for a quick assessment of the relative magnitudes of the values. The data suggests a concentration of higher values in the bottom-left corner and lower values in the right column. This type of visualization is useful for identifying patterns and trends in data.
</details>
Figure 23: Confusion matrix for BTC/USD
<details>
<summary>extracted/6391907/images/eth-ml.png Details</summary>

### Visual Description
## Heatmap: Numerical Grid
### Overview
The image is a 3x3 heatmap displaying numerical values within each cell. The color intensity corresponds to the magnitude of the number, with darker colors representing lower values and brighter colors representing higher values.
### Components/Axes
* **Grid:** A 3x3 grid structure.
* **Color Scale:** The color intensity varies, indicating the magnitude of the numbers.
* **Numerical Values:** Each cell contains a numerical value.
### Detailed Analysis
Here's a breakdown of the numerical values and their corresponding cell positions:
* **Top-Left:** 9 (Pink)
* **Top-Center:** 11 (Orange-Pink)
* **Top-Right:** 1 (Dark Blue)
* **Middle-Left:** 12 (Orange)
* **Middle-Center:** 17 (Yellow)
* **Middle-Right:** 3 (Dark Purple)
* **Bottom-Left:** 4 (Purple)
* **Bottom-Center:** 9 (Pink)
* **Bottom-Right:** 5 (Purple-Pink)
### Key Observations
* The highest value (17) is located in the center cell.
* The lowest value (1) is located in the top-right cell.
* The values generally increase towards the center of the grid.
### Interpretation
The heatmap visually represents the distribution of numerical values across a 3x3 grid. The color gradient allows for a quick assessment of the relative magnitudes of the numbers. The central cell having the highest value suggests a concentration or focal point in that area. The heatmap could represent various data, such as website click-through rates, temperature distribution, or any other data that can be represented in a grid format.
</details>
Figure 24: Confusion matrix for ETH/USD
<details>
<summary>extracted/6391907/images/ltc-ml.png Details</summary>

### Visual Description
## Heatmap: Numerical Grid
### Overview
The image is a heatmap representing a 3x3 grid of numerical values. Each cell is colored according to its value, with warmer colors (yellow, orange) indicating higher values and cooler colors (purple, blue) indicating lower values.
### Components/Axes
* **Grid:** A 3x3 grid structure.
* **Values:** Numerical values within each cell.
* **Color Scale:** The color of each cell corresponds to its numerical value.
### Detailed Analysis
Here's a breakdown of the grid and its values:
* **Row 1:**
* Cell 1 (top-left): 8 (coral color)
* Cell 2 (top-center): 10 (orange color)
* Cell 3 (top-right): 2 (dark blue color)
* **Row 2:**
* Cell 1 (middle-left): 12 (yellow color)
* Cell 2 (middle-center): 13 (yellow color)
* Cell 3 (middle-right): 5 (purple color)
* **Row 3:**
* Cell 1 (bottom-left): 8 (coral color)
* Cell 2 (bottom-center): 8 (coral color)
* Cell 3 (bottom-right): 5 (purple color)
### Key Observations
* The highest value is 13, located in the center of the grid.
* The lowest value is 2, located in the top-right corner.
* The values in the middle row are generally higher than those in the other rows.
* The values in the rightmost column are generally lower than those in the other columns.
### Interpretation
The heatmap visually represents the distribution of numerical values across the grid. The color gradient allows for a quick assessment of relative magnitudes, highlighting areas of high and low concentration. The data suggests a concentration of higher values in the central region of the grid, with lower values towards the periphery. This type of visualization is useful for identifying patterns and trends in data that can be represented in a matrix format.
</details>
Figure 25: Confusion matrix for LTC/USD
<details>
<summary>extracted/6391907/images/xrp-ml.png Details</summary>

### Visual Description
## Heatmap: Numerical Grid
### Overview
The image is a heatmap representing a 3x3 grid of numerical values. Each cell is colored according to its value, with a color gradient ranging from dark blue (lowest values) to bright yellow (highest values).
### Components/Axes
* **Grid:** 3 rows and 3 columns.
* **Values:** The numerical values within each cell.
* **Color Gradient:** The color of each cell corresponds to its numerical value.
### Detailed Analysis
Here's a breakdown of the values and their corresponding colors:
* **Row 1:**
* Cell 1 (top-left): 10 (orange)
* Cell 2 (top-center): 5 (purple)
* Cell 3 (top-right): 9 (red-orange)
* **Row 2:**
* Cell 1 (middle-left): 10 (orange)
* Cell 2 (middle-center): 8 (pink)
* Cell 3 (middle-right): 13 (yellow)
* **Row 3:**
* Cell 1 (bottom-left): 3 (dark blue)
* Cell 2 (bottom-center): 6 (purple)
* Cell 3 (bottom-right): 7 (purple-pink)
### Key Observations
* The highest value is 13, located in the middle-right cell.
* The lowest value is 3, located in the bottom-left cell.
* The values are not uniformly distributed.
### Interpretation
The heatmap visually represents the distribution of numerical values across a 3x3 grid. The color gradient allows for a quick assessment of the relative magnitudes of the values. The data suggests that the highest values are concentrated in the middle-right cell, while the lowest value is in the bottom-left cell. The heatmap provides a clear and intuitive way to compare the values and identify patterns.
</details>
Figure 26: Confusion matrix for XRP/USD
The second model is ARIMA, introduced by [Box et al., 2015], and it aims to predict future trends. The results of our model are as follows:
<details>
<summary>extracted/6391907/images/arima.png Details</summary>

### Visual Description
## ARIMA Model Results
### Overview
The image presents the results of an ARIMA (Autoregressive Integrated Moving Average) model. It includes model specifications, goodness-of-fit statistics, coefficient estimates, and root analysis.
### Components/Axes
**Header:**
* Title: ARIMA Model Results
* Dep. Variable: D.Close
* Model: ARIMA(4, 1, 0)
* Method: css-mle
* Date: Mon, 02 May 2022
* Time: 03:16:01
* Sample: 05-03-2021 - 02-17-2022
* No. Observations: 291
* Log Likelihood: -2586.480
* S.D. of innovations: 1753.258
* AIC: 5184.959
* BIC: 5206.999
* HQIC: 5193.789
**Coefficient Estimates Table:**
* Columns: coef, std err, z, P>|z|, [0.025, 0.975]
* Rows: const, ar.L1.D.Close, ar.L2.D.Close, ar.L3.D.Close, ar.L4.D.Close
**Roots Table:**
* Columns: Real, Imaginary, Modulus, Frequency
* Rows: AR.1, AR.2, AR.3, AR.4
### Detailed Analysis
**Coefficient Estimates Table:**
| | coef | std err | z | P>\|z\| | \[0.025 | 0.975] |
|---------------|-----------|---------|---------|---------|-----------|-----------|
| const | -55.2311 | 101.025 | -0.547 | 0.585 | -253.236 | 142.774 |
| ar.L1.D.Close | -0.0541 | 0.059 | -0.923 | 0.357 | -0.169 | 0.061 |
| ar.L2.D.Close | -0.0278 | 0.059 | -0.470 | 0.638 | -0.143 | 0.088 |
| ar.L3.D.Close | -0.0297 | 0.060 | -0.499 | 0.618 | -0.147 | 0.087 |
| ar.L4.D.Close | 0.0947 | 0.060 | 1.592 | 0.113 | -0.022 | 0.211 |
**Roots Table:**
| | Real | Imaginary | Modulus | Frequency |
|-------|-----------|-----------|---------|-----------|
| AR.1 | -1.7241 | -0.0000j | 1.7241 | -0.5000 |
| AR.2 | 0.0309 | -1.7600j | 1.7603 | -0.2472 |
| AR.3 | 0.0309 | +1.7600j | 1.7603 | 0.2472 |
| AR.4 | 1.9763 | -0.0000j | 1.9763 | -0.0000 |
### Key Observations
* The dependent variable is "D.Close".
* The ARIMA model is of order (4, 1, 0).
* The sample period is from 05-03-2021 to 02-17-2022.
* Most of the coefficients for the autoregressive terms (ar.L1.D.Close to ar.L4.D.Close) are not statistically significant at a 5% significance level (P>|z| > 0.05).
* The roots of the AR polynomial have varying real and imaginary components, with corresponding moduli and frequencies.
### Interpretation
The ARIMA model results provide insights into the time series behavior of "D.Close". The model attempts to capture the autocorrelation structure in the data using four lagged terms. However, the high p-values for most of the autoregressive coefficients suggest that these lags may not be strong predictors of the current value of "D.Close". The roots analysis provides information about the stability and oscillatory behavior of the time series. The moduli of the roots are all greater than 1, suggesting that the model is stationary. The frequencies indicate the cyclical patterns present in the data.
</details>
Figure 27: Results of the ARIMA model
3 The Cryptocurrency Market is Inefficient
In 1981, Robert Shiller [Shiller, 1980] showed a higher volatility than that predicted by the rational behavior of agents. Shiller concluded that no rationality could explain the observed volatility, which ultimately had no link with dividend expectations. Thus, if the market is inefficient, it is possible to achieve performances superior to the market.
3.1 Robert Shiller and the Notion of an Inefficient Market in Terms of Arbitrage
This section deals with elements that prove that the Bitcoin market admits arbitrage opportunities. For example, we observe that the price of Bitcoin varies from one exchange to another. This is even more true for the altcoin market. Intuitively, we can imagine that the price will tend to move closer to the average price across exchanges.
3.1.1 Volatility and Expected Dividends
In his book, [Shiller, 2015], Shiller shows the difference between stock price volatility and expected dividends:
<details>
<summary>extracted/6391907/images/shiller-plot.png Details</summary>

### Visual Description
## Line Chart: Real S&P Stock Price Index, Earnings, and Dividends
### Overview
The image is a line chart comparing the trends of the Real S&P Stock Price Index, Earnings, Dividends, and Interest Rates from 1870 to 2010. The chart uses a dual y-axis, with the left axis representing the index, earnings, and dividends (1871 = 100), and the right axis representing the interest rate (%).
### Components/Axes
* **X-axis:** Year, ranging from 1870 to 2010, with markers every 20 years (1870, 1890, 1910, 1930, 1950, 1970, 1990, 2010).
* **Left Y-axis:** Real S&P Stock Price Index, Earnings, and Dividends (1871 = 100), ranging from 0 to 2500, with markers every 500 units (0, 500, 1000, 1500, 2000, 2500).
* **Right Y-axis:** Interest Rate (%), ranging from 0 to 100, with markers every 20 units (0, 20, 40, 60, 80, 100).
* **Legend:**
* **Price:** Red line
* **Earnings:** Blue line
* **Dividends:** Green line
* **Interest Rates:** Black line
* **Source:** Located at the bottom-right of the chart: irrationalexuberance.com/shiller\_downloads/ie\_data.xls
### Detailed Analysis
* **Price (Red Line):** The price index shows a general upward trend over the period. It remains relatively low and stable until around 1950, after which it begins to increase more significantly. There is a notable peak around the year 2000, followed by a sharp decline and subsequent recovery.
* 1870-1950: Approximately between 0 and 500.
* 2000: Peaks at approximately 2400.
* 2010: Approximately 1500.
* **Earnings (Blue Line):** The earnings also show an upward trend, generally following the price index but with more volatility. The earnings line is consistently below the price line, except for brief periods.
* 1870-1950: Approximately between 0 and 500.
* 2000: Peaks at approximately 1000.
* 2010: Approximately 500.
* **Dividends (Green Line):** The dividends show a gradual upward trend, with less volatility compared to the price and earnings. The dividends line remains relatively low for most of the period, with a more noticeable increase after 1950.
* 1870-1950: Approximately between 0 and 200.
* 2010: Approximately 500.
* **Interest Rates (Black Line):** The interest rates fluctuate over the period, with several peaks and troughs. The interest rates remain relatively low until around 1970, after which they become more volatile.
* 1870: Approximately 4%.
* 1920: Approximately 6%.
* 1980: Approximately 15%.
* 2010: Approximately 2%.
### Key Observations
* The Price and Earnings lines show a strong correlation, with both experiencing significant growth after 1950.
* The Dividends line shows a more gradual and stable growth compared to the Price and Earnings lines.
* The Interest Rates line shows significant fluctuations, with no clear long-term trend.
* The peak in the Price line around the year 2000 is a notable outlier, followed by a sharp decline.
### Interpretation
The chart illustrates the historical trends of the S&P Stock Price Index, Earnings, Dividends, and Interest Rates. The data suggests that stock prices and earnings have generally increased over time, with periods of significant growth and volatility. Dividends have also increased, but at a more gradual pace. Interest rates have fluctuated, reflecting changes in monetary policy and economic conditions. The peak in stock prices around the year 2000, followed by a sharp decline, may reflect the dot-com bubble and its subsequent burst. The relationship between these variables can provide insights into the factors that drive stock market performance and the overall health of the economy.
</details>
Figure 28: Evolution of the S&P500 and dividends
According to him: "the price-to-earnings ratio is still (as of 2005) far from its historical average from the mid-20th century. Investors place too much trust in the market and overestimate the positive developments of their investments without sufficiently hedging against a market downturn." It is therefore difficult to determine whether the crypto market is inefficient based solely on this information, as cryptocurrencies do not pay dividends.
3.1.2 Behavioral Finance and Market Anomalies
Shiller introduces the concept of behavioral finance. In the crypto market, we mainly think of herd behavior: investors buy simply because other investors are buying. This phenomenon is less visible in day-trading because time scales are too short to draw conclusions about the trend. Indeed, the 2017 bubble still took some time to form and partially burst.
3.1.3 Speculative Bubbles
When it comes to cryptocurrencies, speculative bubbles are often mentioned. It is true that cryptocurrencies provide fertile ground for such phenomena, but this only matters for medium-term investors. A long-term investor will mainly seek to minimize diversifiable risk through cryptocurrencies, while a short-term trader will hope to enter the market before a hype event. Moreover, these hypes can sometimes be artificially created by one or several people, sometimes even behind fraudulent projects. Over time, as projects repeat, fraud risks decrease, and hypes also tend to diminish, making the crypto market increasingly efficient and reducing the possibility of bubbles.
3.2 Informational Inefficiency
We will look at scenarios where information asymmetries allow an individual or a group to achieve superior returns to the market. In such situations, cryptocurrency prices do not reflect all available information.
3.2.1 Market Manipulation
The most famous example is the public use of Twitter by Elon Musk, with each of his crypto-related tweets causing abrupt movements in the crypto market. By deduction, we can imagine similar scenarios involving other public figures, broker managers, intermediaries, etc.
3.2.2 Pump & Dump
Pump & Dump was a strong practice during the early days of crypto hype. It consisted of gathering the largest possible group of users around a well-promoted cryptocurrency. The initiator of the movement would encourage the entire community to engage with the project for a single purpose: to artificially inflate the price of the cryptocurrency. Once the cryptocurrency reached a satisfactory price, the initiatorâwho had taken care to invest as much as possible when the crypto was worth nothingâwould sell everything and exit the project. This type of phenomenon was also seen with ICOs.
3.2.3 Natural Language Processing
Natural Language Processing (NLP) can be used to analyze market sentiment without manually reading content. For example, the bot, whose code is in Appendix H, returns the following results:
<details>
<summary>x3.png Details</summary>

### Visual Description
## Trade Log Data
### Overview
The image presents a log of simulated or actual trading activity, showing buy and sell prices along with the resulting profit for each transaction. The data is structured as a series of rows, each representing a single trade. Each row includes the buy price, sell price, and the calculated profit percentage.
### Components/Axes
* **BUY:** The price at which the asset was purchased.
* **SELL:** The price at which the asset was sold.
* **Profit:** The percentage profit or loss resulting from the trade, calculated as `((SELL - BUY) / BUY) * 100`. The percentage symbol (%) is present after each profit value.
### Detailed Analysis or ### Content Details
Here's a breakdown of the data, row by row:
1. **BUY:** 38088.01953125, **SELL:** 38038.94921875, **Profit:** -0.129%
* Trend: A slight loss.
2. **BUY:** 37287.16796875, **SELL:** 37261.2109375, **Profit:** -0.07%
* Trend: A slight loss.
3. **BUY:** 38840.984375
* Trend: Incomplete data.
4. **BUY:** 38673.09375, **SELL:** 38657.91015625, **Profit:** -0.039%
* Trend: A very slight loss.
5. **BUY:** 38840.0859375, **SELL:** 38811.48046875, **Profit:** -0.074%
* Trend: A slight loss.
6. **BUY:** 38527.58984375, **SELL:** 38453.19921875, **Profit:** -0.193%
* Trend: A moderate loss.
7. **BUY:** 37744.546875
* Trend: Incomplete data.
8. **BUY:** 36894.6015625, **SELL:** 36772.21875, **Profit:** -0.332%
* Trend: A moderate loss.
9. **BUY:** 35931.7734375, **SELL:** 35859.265625, **Profit:** -0.202%
* Trend: A moderate loss.
10. **BUY:** 36071.19921875
* Trend: Incomplete data.
11. **BUY:** 36106.11328125, **SELL:** 35970.46484375, **Profit:** -0.376%
* Trend: A moderate loss.
12. **BUY:** 36142.52734375, **SELL:** 36132.40625, **Profit:** -0.028%
* Trend: A very slight loss.
13. **BUY:** 35119.19140625
* Trend: Incomplete data.
14. **BUY:** 35625.203125, **SELL:** 35562.3359375, **Profit:** -0.176%
* Trend: A moderate loss.
15. **BUY:** 36173.3984375, **SELL:** 36164.9375, **Profit:** -0.023%
* Trend: A very slight loss.
16. **BUY:** 36123.421875
* Trend: Incomplete data.
17. **BUY:** 36123.828125, **SELL:** 36191.2109375, **Profit:** 0.187%
* Trend: A slight profit.
18. **BUY:** 35903.81640625, **SELL:** 35875.41796875, **Profit:** -0.079%
* Trend: A slight loss.
19. **BUY:** 36118.94140625, **SELL:** 36143.51171875, **Profit:** 0.068%
* Trend: A slight profit.
20. **BUY:** 35928.0546875, **SELL:** 35939.76171875, **Profit:** 0.033%
* Trend: A very slight profit.
21. **BUY:** 35620.83984375, **SELL:** 35634.2890625, **Profit:** 0.038%
* Trend: A very slight profit.
22. **BUY:** 35800.88671875, **SELL:** 36131.80078125, **Profit:** 0.924%
* Trend: A significant profit.
### Key Observations
* Most trades result in a small loss.
* A few trades result in small profits.
* One trade shows a significant profit (0.924%).
* Several rows have incomplete data, missing either the SELL price or the Profit.
### Interpretation
The data suggests a trading strategy that, on average, results in small losses. The presence of a few profitable trades indicates potential for profit, but the strategy may need refinement to increase the frequency and magnitude of profitable trades while minimizing losses. The incomplete data entries could represent trades that were not completed or data entry errors. The large profit on the last trade is a notable outlier, suggesting a potentially successful trade or an anomaly that requires further investigation.
</details>
Figure 29: Results from the NLP trading bot
3.3 Operational Inefficiency
The price of Bitcoin can be predicted if one knows in advance the factors likely to influence the network as a whole, or a significant part of it. We will explore whether one or several elements hindering cryptocurrency exchanges can induce market movements.
3.3.1 At the Macroscopic Scale
We can take the example of countries that ban cryptocurrencies. These bans have a notable effect on liquidity, or cases of massive adoption like in El Salvador or the Marshall Islands, or the future rise of CBDCs (such as the digital euro). Environmental concerns, which are becoming a major issue, also hinder liquidity, as cryptocurrencies require a significant amount of electricity resources.
3.3.2 At the Mesoscopic Scale
Certain cryptocurrencies can have a negative impact on others. For example, Monero, with its private blockchain, can very well absorb all the demand for cryptocurrencies that also aim to respect user privacy. The same goes for issues related to transaction speed.
3.3.3 At the Microscopic Scale
There are usage barriers to crypto-assets among households that strongly impact the markets, such as the prohibition of cryptocurrency usage for minors, broker restrictions regarding certain trading positions, security risks and broker compliance concerning suspicious activities, tainted bitcoins, and money laundering (KYC/AML requirements), the impact of taxation on crypto-related capital gains, and various hacks. It can be observed that these phenomena have much less impact on the markets than macro or even meso factors. However, households and discretionary traders still represent a large part of the crypto market landscape.
4 Conclusion
In conclusion, by default, it is not possible to predict Bitcoin since it is an asset very similar in nature to others (notably the stock market), but, as with any market, there are moments when the market is inefficient, and thus it is possible to profit from these moments and predict Bitcoin prices accurately.
Among the limitations, we focus only on the spot market, we do not consider the influence of other cryptocurrencies, and we are limited in our expertise in time series analysis.
Among public policy recommendations, we agree with the view of [Brito et al., 2014] regarding the regulation of brokers and particularly of derivatives products, which are becoming increasingly significant in the crypto market.
Appendix A isRandomBetter( $\Omega,n,k$ )
âŹ
1 # The set Omega is a subset of all cryptocurrencies on the market (between 10,000 and 20,000)
2 Omega = [â1INCH-USDâ, âAAVE-USDâ, âACH-USDâ, âADA-USDâ, âAERGO-USDâ, âAGLD-USDâ,
3 âAIOZ-USDâ, âALCX-USDâ, âALGO-USDâ, âALICE-USDâ, âAMP-USDâ, âANKR-USDâ,
4 âAPE-USDâ, âAPI3-USDâ, âARPA-USDâ, âASM-USDâ, âATOM-USDâ, âAUCTION-USDâ,
5 âAVAX-USDâ, âAVT-USDâ, âAXS-USDâ, âBADGER-USDâ, âBAL-USDâ, âBAND-USDâ,
6 âBAT-USDâ, âBCH-USDâ, âBICO-USDâ, âBLZ-USDâ, âBNT-USDâ, âBOND-USDâ,
7 âBTC-USDâ, âBTRST-USDâ, âCHZ-USDâ, âCLV-USDâ, âCOMP-USDâ,
8 âCOTI-USDâ, âCOVAL-USDâ, âCRO-USDâ, âCRPT-USDâ, âCRV-USDâ, âCTSI-USDâ,
9 âCTX-USDâ, âCVC-USDâ, âDAI-USDâ, âDASH-USDâ, âDDX-USDâ, âDESO-USDâ,
10 âDIA-USDâ, âDNT-USDâ, âDOGE-USDâ, âDOT-USDâ, âENJ-USDâ, âENS-USDâ,
11 âEOS-USDâ, âERN-USDâ, âETC-USDâ, âETH-USDâ, âFARM-USDâ,
12 âFET-USDâ, âFIDA-USDâ, âFIL-USDâ, âFORTH-USDâ, âFOX-USDâ, âFX-USDâ,
13 âGALA-USDâ, âGFI-USDâ, âGLM-USDâ, âGNT-USDâ, âGODS-USDâ,
14 âGRT-USDâ, âGTC-USDâ, âGYEN-USDâ, âHIGH-USDâ, âICP-USDâ, âIDEX-USDâ,
15 âIMX-USDâ, âINV-USDâ, âIOTX-USDâ, âJASMY-USDâ, âKEEP-USDâ, âKNC-USDâ,
16 âKRL-USDâ, âLCX-USDâ, âLINK-USDâ, âLOOM-USDâ, âLPT-USDâ, âLQTY-USDâ,
17 âLRC-USDâ, âLTC-USDâ, âMANA-USDâ, âMASK-USDâ, âMATIC-USDâ, âMCO2-USDâ,
18 âMDT-USDâ, âMINA-USDâ, âMIR-USDâ, âMKR-USDâ, âMLN-USDâ, âMPL-USDâ,
19 âMUSD-USDâ, âNCT-USDâ, âNKN-USDâ, âNMR-USDâ, âNU-USDâ, âOGN-USDâ,
20 âOMG-USDâ, âORCA-USDâ, âORN-USDâ, âOXT-USDâ, âPERP-USDâ,
21 âPLA-USDâ, âPLU-USDâ, âPOLS-USDâ, âPOLY-USDâ, âPOWR-USDâ, âPRO-USDâ,
22 âQNT-USDâ, âQSP-USDâ, âQUICK-USDâ, âRAD-USDâ, âRAI-USDâ, âRARI-USDâ,
23 âRBN-USDâ, âREN-USDâ, âREP-USDâ, âREQ-USDâ, âRGT-USDâ, âRLC-USDâ,
24 âRLY-USDâ, âRNDR-USDâ, âSHIB-USDâ, âSHPING-USDâ, âSKL-USDâ, âSNT-USDâ,
25 âSNX-USDâ, âSOL-USDâ, âSPELL-USDâ, âSTORJ-USDâ, âSTX-USDâ, âSUKU-USDâ,
26 âSUPER-USDâ, âSUSHI-USDâ, âSYN-USDâ, âTBTC-USDâ, âTRAC-USDâ, âTRB-USDâ,
27 âTRIBE-USDâ, âTRU-USDâ, âUMA-USDâ, âUNFI-USDâ, âUNI-USDâ, âUPI-USDâ,
28 âUSDC-USDâ, âUSDT-USDâ, âUST-USDâ, âVGX-USDâ, âWBTC-USDâ,
29 âWCFG-USDâ, âWLUNA-USDâ, âXLM-USDâ, âXRP-USDâ, âXTZ-USDâ, âXYO-USDâ,
30 âYFI-USDâ, âYFII-USDâ, âZEC-USDâ, âZEN-USDâ, âZRX-USDâ]
âŹ
1 # This function returns a list of returns for each asset
2 def loadChanges (Omega):
3 changes = []
4 for asset in Omega:
5 # Import time
6 time. sleep (1)
7 # We use the yFinance library to get the data
8 df = yf. download (asset, period = â2yâ, interval = â1dâ, progress = False)
9 if df. empty:
10 continue
11 oneYear = df. loc [â2021-01-01â: â2022-01-01â]
12 if oneYear. empty or len (df) < 360:
13 continue
14 # Import pandas
15 s = pd. Series (list (oneYear [âCloseâ]))
16 if not s [s. isin ([0])]. empty:
17 continue
18 else:
19 start = oneYear. iloc [0][âCloseâ]
20 final = oneYear. iloc [-1][âCloseâ]
21 change = ((final - start)/ start)*100
22 changes. append (change)
23 print ("len Valid assets : ", len (changes), " (only consider the 1st print!)")
24 return changes
âŹ
1 # This function returns the average of returns
2 def getMeanChanges (Omega):
3 changes = loadChanges (Omega)
4 return sum (changes)/ len (changes)
âŹ
1 # This function randomly selects a portfolio of crypto-assets among those available in Omega
2 def generateRandomPortfolio (Omega, k):
3 randomPortfolio = []
4 for _ in range (k):
5 # Import random
6 randomPortfolio. append (random. choice (Omega))
7 return randomPortfolio
âŹ
1 # This function returns the percentage of portfolios with an average return higher than the average return
2 # of the assets in Omega
3 def getPercentageHigherThanAverage (Omega, NbIter, k):
4 nbHigher = 0
5 averageReturns = getMeanChanges (Omega)
6 for _ in range (NbIter):
7 randomPortfolio = generateRandomPortfolio (Omega, k)
8 randomAverage = getMeanChanges (randomPortfolio)
9 if randomAverage > averageReturns:
10 nbHigher += 1
11 perc = round (nbHigher / NbIter *100)
12 print (f "{k} asset(s) in {NbIter} random portfolio(s)")
13 print ("Average returns :", round (averageReturns))
14 print (f "Percentage of random portfolios above the average : {perc}%")
15 return perc
âŹ
1 # This function returns whether a random portfolio outperforms an average portfolio,
2 # provided that 51% or more random portfolios outperform the average
3 def isRandomBetter (list, NbIter, k):
4 perc = getPercentageHigherThanAverage (list, NbIter, k)
5 if perc < 51:
6 return False
7 else:
8 return True
âŹ
1 # Tests
2 print ("Test 1")
3 print (isRandomBetter (Omega, 10, 10))
4 print ("Test 2")
5 print (isRandomBetter (Omega, 10, 20))
6 print ("Test 3")
7 print (isRandomBetter (Omega, 20, 10))
8 print ("Test 4")
9 print (isRandomBetter (Omega, 20, 20))
10 print ("Test 5")
11 print (isRandomBetter (Omega, 20, 30))
12 print ("Test 6")
13 print (isRandomBetter (Omega, 30, 20))
14 print ("Test 7")
15 print (isRandomBetter (Omega, 30, 30))
16 print ("Test 8")
17 print (isRandomBetter (Omega, 30, 10))
18 print ("Test 9")
19 print (isRandomBetter (Omega, 10, 30))
20 print ("Test 10")
21 print (isRandomBetter (Omega, 40, 5))
Appendix B isSMABetter( $\Omega,n,r$ )
âŹ
1 # This function returns True if the average return of the SMA strategy
2 # is higher than the average of both hold and random strategies
3 def isSMABetter (Omega, n, r):
4 validAssets = 0
5 SMARets = []
6 HoldRets = []
7 RandomRets = []
8 nbBetter = 0
9 for asset in Omega:
10 sma_return = getSMAReturn (asset, n, r)
11 if not sma_return:
12 continue
13 else:
14 SMARets. append (sma_return)
15 hold_return = getHoldReturn (asset)
16 if not hold_return:
17 continue
18 else:
19 HoldRets. append (hold_return)
20 random_return = getRandomReturn (asset)
21 if not random_return:
22 continue
23 else:
24 RandomRets. append (random_return)
25 if sma_return > hold_return and sma_return > random_return:
26 nbBetter += 1
27 validAssets += 1
28
29 sma_average = round (sum (SMARets) / len (SMARets))
30 hold_average = round (sum (HoldRets) / len (HoldRets))
31 random_average = round (sum (RandomRets) / len (RandomRets))
32 print ("Number of valid assets : ", validAssets)
33 print ("SMA average : ", sma_average)
34 print ("Hold average : ", hold_average)
35 print ("Random average : ", random_average)
36 perc = round (nbBetter / validAssets *100)
37 print (f "{perc}% of assets do better with SMA.")
38 if perc < 50:
39 return False
40 else:
41 return True
Appendix C getHoldReturn(asset)
âŹ
1 # This function returns the return of the asset "asset" with the hold strategy
2 def getHoldReturn (asset):
3 df = yf. download (asset, period = â2yâ, interval = â1dâ, progress = False)
4 if df. empty:
5 return False
6 oneYear = df. loc [â2021-01-01â: â2022-01-01â]
7 s = pd. Series (list (oneYear [âCloseâ]))
8 if oneYear. empty or len (oneYear) < 360 or not s [s. isin ([0])]. empty:
9 return False
10 else:
11 start = oneYear. iloc [0][âCloseâ]
12 if start == 0:
13 return False
14 else:
15 final = oneYear. iloc [-1][âCloseâ]
16 return round (((final - start)/ start)*100)
Appendix D getSMAReturn(asset, n, r)
âŹ
1 # This function returns the sum of daily returns
2 # of the asset "asset" with the SMA trading strategy
3 def getSMAReturn (asset, n, r):
4 range = 1+(r /100)
5 df = yf. download (asset, period = â2yâ, interval = â1dâ, progress = False)
6 if df. empty:
7 return False
8 oneYear = df. loc [â2021-01-01â: â2022-01-01â]
9 s = pd. Series (list (oneYear [âCloseâ]))
10 if oneYear. empty or len (oneYear) < 360 or not s [s. isin ([0])]. empty:
11 return False
12 else:
13 oneYear [âSMAâ] = oneYear [âCloseâ]. shift (1). rolling (window = n). mean ()
14 oneYear [âSMAhighâ] = oneYear [âSMAâ]* range
15 oneYear [âSMAlowâ] = oneYear [âSMAâ]/ range
16 oneYear [âSignalâ] = 0
17 oneYear. loc [oneYear [âCloseâ] > oneYear [âSMAhighâ], âSignalâ] = -1
18 oneYear. loc [oneYear [âCloseâ] < oneYear [âSMAlowâ], âSignalâ] = 1
19 oneYear [âChangeâ] = ((oneYear [âCloseâ]- oneYear [âCloseâ]. shift (1))/ oneYear [âCloseâ]. shift (1))*100
20 oneYear [âDayReturnâ] = oneYear [âChangeâ]* oneYear [âSignalâ]
21 ret = round (oneYear [âDayReturnâ]. sum ())
22 return ret
Appendix E getRandomReturn(asset)
âŹ
1 # This function returns the sum of daily returns
2 # of the asset "asset" with a random trading strategy
3 def getRandomReturn (asset):
4 df = yf. download (asset, period = â2yâ, interval = â1dâ, progress = False)
5 if df. empty:
6 return False
7 oneYear = df. loc [â2021-01-01â: â2022-01-01â]
8 s = pd. Series (list (oneYear [âCloseâ]))
9 if oneYear. empty or len (oneYear) < 360 or not s [s. isin ([0])]. empty:
10 return False
11 else:
12 oneYear [âSignalâ] = 0
13 oneYear [âRandomâ] = [random. randint (1,9) for _ in oneYear. index]
14 oneYear. loc [oneYear [âRandomâ] > 6, âSignalâ] = 1
15 oneYear. loc [oneYear [âRandomâ] < 4, âSignalâ] = -1
16 oneYear [âChangeâ] = ((oneYear [âCloseâ]- oneYear [âCloseâ]. shift (1))/ oneYear [âCloseâ]. shift (1))*100
17 oneYear [âDayReturnâ] = oneYear [âChangeâ]* oneYear [âSignalâ]
18 return round (oneYear [âDayReturnâ]. sum ())
Appendix F getRandomPerc( $\Omega$ )
âŹ
1 # This function returns the percentage of assets that follow a random walk
2 def getPercRandom (Omega):
3 nbRandom = 0
4 nbTotal = 0
5 for asset in Omega:
6 time. sleep (1)
7 df = yf. download (asset, period = âmaxâ, interval = â1dâ, progress = False)
8 if df. empty:
9 continue
10 s = pd. Series (list (df [âCloseâ]))
11 if not s [s. isin ([0])]. empty or len (df) < 100:
12 continue
13 else:
14 nbTotal += 1
15 pval = adfuller (df [âCloseâ])[1]
16 if pval > 0.05:
17 nbRandom +=1
18 perc = nbRandom / nbTotal *100
19 return perc
Appendix G getAverageAccuracy( $\Omega,n$ )
âŹ
1 # This function returns the average accuracy percentage of our machine learning model
2 def getAverageAccuracy (Omega, n):
3 accuracies = []
4 for asset in Omega:
5 df = yf. download (asset, period = â1yâ, interval = â1dâ, progress = False)
6 df = df. drop (df [df [âVolumeâ] == 0]. index)
7 df [âRSIâ] = ta. RSI (np. array (df [âCloseâ]. shift (1)), timeperiod = n)
8 df [âSMAâ] = df [âCloseâ]. shift (1). rolling (window = n). mean ()
9 df [âCorrâ] = df [âCloseâ]. shift (1). rolling (window = n). corr (df [âSMAâ]. shift (1))
10 df [âSARâ] = ta. SAR (np. array (df [âHighâ]. shift (1)), np. array (df [âLowâ]. shift (1)), 0.2, 0.2)
11 df [âADXâ] = ta. ADX (np. array (df [âHighâ]. shift (1)), np. array (df [âLowâ]. shift (1)), np. array (df [âCloseâ]. shift (1)), timeperiod = n)
12 df [âATRâ] = ta. ATR (np. array (df [âHighâ]. shift (1)), np. array (df [âLowâ]. shift (1)), np. array (df [âCloseâ]. shift (1)), timeperiod = n)
13 df [âPHâ] = df [âHighâ]. shift (1)
14 df [âPLâ] = df [âLowâ]. shift (1)
15 df [âPCâ] = df [âCloseâ]. shift (1)
16 df [âO-Oâ] = df [âOpenâ] - df [âOpenâ]. shift (1)
17 df [âO-Câ] = df [âOpenâ] - df [âPCâ]. shift (1)
18 df [âRetâ] = (df [âOpenâ]. shift (-1) - df [âOpenâ]) / df [âOpenâ]
19 for i in range (1, n):
20 df [âr%iâ % i] = df [âRetâ]. shift (i)
21 df. loc [df [âCorrâ] < -1, âCorrâ] = -1
22 df. loc [df [âCorrâ] > 1, âCorrâ] = 1
23 df = df. dropna ()
24 t = 0.8
25 split = int (t * len (df))
26 df [âSignalâ] = 0
27 df. loc [df [âRetâ] > df [âRetâ][: split]. quantile (q =0.66), âSignalâ] = 1
28 df. loc [df [âRetâ] < df [âRetâ][: split]. quantile (q =0.34), âSignalâ] = -1
29 X = df. drop ([âCloseâ, âAdj Closeâ, âSignalâ, âHighâ, âLowâ, âVolumeâ, âRetâ], axis =1)
30 y = df [âSignalâ]
31 c = [10,100,1000,10000,100000,100000]
32 g = [1 e -4,1 e -3,1 e -2,1 e -1,1 e0]
33 p = {âsvc__Câ: c, âsvc__gammaâ: g, âsvc__kernelâ: [ârbfâ]}
34 s = [(âsâ, StandardScaler ()), (âsvcâ, SVC ())]
35 pp = Pipeline (s)
36 rcv = RandomizedSearchCV (pp, p, cv = TimeSeriesSplit (n_splits =2))
37 rcv. fit (X. iloc [: split], y. iloc [: split])
38 c = rcv. best_params_ [âsvc__Câ]
39 k = rcv. best_params_ [âsvc__kernelâ]
40 g = rcv. best_params_ [âsvc__gammaâ]
41 cls = SVC (C = c, kernel = k, gamma = g)
42 S = StandardScaler ()
43 cls. fit (S. fit_transform (X. iloc [: split]), y. iloc [: split])
44 y_predict = cls. predict (S. transform (X. iloc [split:]))
45 df [âPred_Signalâ] = 0
46 df. iloc [: split, df. columns. get_loc (âPred_Signalâ)] = pd. Series (
47 cls. predict (S. transform (X. iloc [: split])). tolist ())
48 df. iloc [split:, df. columns. get_loc (âPred_Signalâ)] = y_predict
49 df [âRet1â] = df [âRetâ] * df [âPred_Signalâ]
50 cr = classification_report (y [split:], y_predict, output_dict = True)
51 accuracies. append (cr [âaccuracyâ])
52 return round (sum (accuracies) / len (accuracies) * 100)
Appendix H NLP Trading Bot
âŹ
1 import tweepy
2 import time
3 from textblob import TextBlob
4 import yfinance as yf
5
6 # Authentication
7 key = ""
8 csecret = ""
9 atoken = ""
10 atsecret = ""
11 nb = 500
12 keywords = ["BTC", "#BTC", "Bitcoin"]
13
14 auth = tweepy. OAuthHandler (ckey, csecret)
15 auth. set_access_token (atoken, atsecret)
16 api2 = tweepy. API (auth, wait_on_rate_limit = True, wait_on_rate_limit_notify = True)
17
18 def perc (a, b):
19 temp = 100 * float (a) / float (b)
20 return format (temp, â.2fâ)
21
22 def get_current_price (symbol):
23 ticker = yf. Ticker (symbol)
24 todays_data = ticker. history (period = â1dâ)
25 return todays_data [âCloseâ][0]
26
27 def get_twitter_BTC ():
28 ratios = 0
29 for keyword in keywords:
30 tweets = tweepy. Cursor (api2. search, q = keyword, lang = "en"). items (nb)
31 pos = 0
32 neg = 0
33 for tweet in tweets:
34 analysis = TextBlob (tweet. text)
35 if 0 <= analysis. sentiment. polarity <= 1:
36 pos += 1
37 elif -1 <= analysis. sentiment. polarity < 0:
38 neg += 1
39 pos = perc (pos, nb)
40 neg = perc (neg, nb)
41 if float (neg) > 0:
42 ratio = float (pos) / float (neg)
43 else:
44 ratio = float (pos)
45 ratios += ratio
46 return ratios
47
48 if __name__ == "__main__":
49 for k in range (1000):
50 score = get_twitter_BTC ()
51 min1 = score + (score * 30 / 100)
52 time. sleep (60*5)
53 new_score = get_twitter_BTC ()
54 if new_score > min1:
55 btc_price = get_current_price ("BTC-USD")
56 buy = "\nBUY : " + str (btc_price)
57 with open ("output.txt", "a") as f:
58 f. write (buy)
59 time. sleep (60*5)
60 new_new_score = get_twitter_BTC ()
61 min2 = new_score - (new_score * 30 / 100)
62 if new_new_score < min2:
63 new_btc_price = get_current_price ("BTC-USD")
64 sell_at = " SELL : " + str (new_btc_price)
65 trade_profit = new_btc_price - btc_price
66 perc_profit = trade_profit / btc_price * 100
67 perc_profit_round = round (perc_profit, 3)
68 sell_message = sell_at + " | " + " Profit = " + str (perc_profit_round) + " %"
69 with open ("output.txt", "a") as f:
70 f. write (sell_message)
71 time. sleep (60*5)
72 else:
73 time. sleep (60*5)
References
- [Aggarwal, 2019] Aggarwal, D. (2019). Do bitcoins follow a random walk model? Research in Economics, 73(1):15â22.
- [Bachelier, 1900] Bachelier, L. (1900). ThĂ©orie de la spĂ©culation. In Annales scientifiques de lâĂcole normale supĂ©rieure, volume 17, pages 21â86.
- [Bandi and Reno, 2016] Bandi, F. M. and Reno, R. (2016). Price and volatility co-jumps. Journal of Financial Economics, 119(1):107â146.
- [Baur et al., 2015] Baur, A. W., BĂŒhler, J., Bick, M., and Bonorden, C. S. (2015). Cryptocurrencies as a disruption? empirical findings on user adoption and future potential of bitcoin and co. In Conference on e-Business, e-Services and e-Society, pages 63â80. Springer.
- [Baur and McDermott, 2010] Baur, D. G. and McDermott, T. K. (2010). Is gold a safe haven? international evidence. Journal of Banking & Finance, 34(8):1886â1898.
- [Biais et al., 2020] Biais, B., Bisiere, C., Bouvard, M., Casamatta, C., and Menkveld, A. J. (2020). Equilibrium bitcoin pricing. Available at SSRN 3261063.
- [Black and Scholes, 2019] Black, F. and Scholes, M. (2019). The pricing of options and corporate liabilities. In World Scientific Reference on Contingent Claims Analysis in Corporate Finance: Volume 1: Foundations of CCA and Equity Valuation, pages 3â21. World Scientific.
- [Bouri et al., 2017] Bouri, E., MolnĂĄr, P., Azzi, G., Roubaud, D., and Hagfors, L. I. (2017). On the hedge and safe haven properties of bitcoin: Is it really more than a diversifier? Finance Research Letters, 20:192â198.
- [Box et al., 2015] Box, G. E., Jenkins, G. M., Reinsel, G. C., and Ljung, G. M. (2015). Time series analysis: forecasting and control. John Wiley & Sons.
- [Brito et al., 2014] Brito, J., Shadab, H., and Castillo, A. (2014). Bitcoin financial regulation: Securities, derivatives, prediction markets, and gambling. Colum. Sci. & Tech. L. Rev., 16:144.
- [Brown et al., 1998] Brown, S. J., Goetzmann, W. N., and Kumar, A. (1998). The dow theory: William peter hamiltonâs track record reconsidered. The Journal of finance, 53(4):1311â1333.
- [Chohan, 2021] Chohan, U. W. (2021). A history of dogecoin. Discussion Series: Notes on the 21st Century.
- [Comte et al., 2012] Comte, F., Coutin, L., and Renault, E. (2012). Affine fractional stochastic volatility models. Annals of Finance, 8(2):337â378.
- [Cortes and Vapnik, 1995] Cortes, C. and Vapnik, V. (1995). Support-vector networks. Machine learning, 20(3):273â297.
- [Cowles 3rd, 1933] Cowles 3rd, A. (1933). Can stock market forecasters forecast? Econometrica: Journal of the Econometric Society, pages 309â324.
- [Cretarola and FigĂ -Talamanca, 2018] Cretarola, A. and FigĂ -Talamanca, G. (2018). Modeling bitcoin price and bubbles. In Blockchain and Cryptocurrencies. IntechOpen.
- [Delcey et al., 2017] Delcey, T. et al. (2017). Efficient market hypothesis, eugene fama and paul samuelson: A reevaluation. Technical report.
- [Dickey and Fuller, 1979] Dickey, D. A. and Fuller, W. A. (1979). Distribution of the estimators for autoregressive time series with a unit root. Journal of the American statistical association, 74(366a):427â431.
- [Einstein, 1956] Einstein, A. (1956). Investigations on the Theory of the Brownian Movement. Courier Corporation.
- [Fama, 1970] Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The journal of Finance, 25(2):383â417.
- [Fisher, 2006] Fisher, I. (2006). The purchasing power of money: itsâ determination and relation to credit interest and crises. Cosimo, Inc.
- [Garcia et al., 2014] Garcia, D., Tessone, C. J., Mavrodiev, P., and Perony, N. (2014). The digital traces of bubbles: feedback cycles between socio-economic signals in the bitcoin economy. Journal of the Royal Society Interface, 11(99):20140623.
- [Gatheral et al., 2018] Gatheral, J., Jaisson, T., and Rosenbaum, M. (2018). Volatility is rough. Quantitative finance, 18(6):933â949.
- [Gordon and Shapiro, 1956] Gordon, M. J. and Shapiro, E. (1956). Capital equipment analysis: the required rate of profit. Management science, 3(1):102â110.
- [Grossman and Stiglitz, 1976] Grossman, S. J. and Stiglitz, J. E. (1976). Information and competitive price systems. The American Economic Review, 66(2):246â253.
- [Haber and Stornetta, 1990] Haber, S. and Stornetta, W. S. (1990). How to time-stamp a digital document. In Conference on the Theory and Application of Cryptography, pages 437â455. Springer.
- [Hanley, 2013] Hanley, B. P. (2013). The false premises and promises of bitcoin. arXiv preprint arXiv:1312.2048.
- [Hayes, 2015] Hayes, A. (2015). The decision to produce altcoins: Minersâ arbitrage in cryptocurrency markets. Available at SSRN 2579448.
- [Heston, 1993] Heston, S. L. (1993). A closed-form solution for options with stochastic volatility with applications to bond and currency options. The review of financial studies, 6(2):327â343.
- [Hou et al., 2020] Hou, A. J., Wang, W., Chen, C. Y., and HĂ€rdle, W. K. (2020). Pricing cryptocurrency options. Journal of Financial Econometrics, 18(2):250â279.
- [Jovanovic, 2009] Jovanovic, F. (2009). Le modĂšle de marche alĂ©atoire dans lâĂ©conomie financiĂšre de 1863 Ă 1976. Revue dâhistoire des sciences humaines, (1):51â78.
- [Kachnowski, 2020] Kachnowski, B. (2020). An empirical stochastic volatility model for bitcoin price range forecasting. Available at SSRN 3693387.
- [Keynes, 1937] Keynes, J. M. (1937). The general theory of employment. The quarterly journal of economics, 51(2):209â223.
- [Khuntia and Pattanayak, 2018] Khuntia, S. and Pattanayak, J. (2018). Adaptive market hypothesis and evolving predictability of bitcoin. Economics Letters, 167:26â28.
- [Lardic and Mignon, 2006] Lardic, S. and Mignon, V. (2006). Lâefficience informationnelle des marchĂ©s financiers. La dĂ©couverte.
- [LeRoy, 1982] LeRoy, S. F. (1982). Expectations models of asset prices: A survey of theory. The Journal of Finance, 37(1):185â217.
- [Lo, 2004] Lo, A. W. (2004). The adaptive markets hypothesis. The Journal of Portfolio Management, 30(5):15â29.
- [Malkiel, 2003] Malkiel, B. G. (2003). The efficient market hypothesis and its critics. Journal of economic perspectives, 17(1):59â82.
- [Mantegna and Stanley, 1999] Mantegna, R. N. and Stanley, H. E. (1999). Introduction to econophysics: correlations and complexity in finance. Cambridge university press.
- [Metcalfe, 1995] Metcalfe, R. (1995). Metcalfeâs law. In Infoworld, volume 17, page 53.
- [Nadarajah and Chu, 2017] Nadarajah, S. and Chu, J. (2017). On the inefficiency of bitcoin. Economics Letters, 150:6â9.
- [Nakamoto, 2008] Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Business Review, page 21260.
- [Odlyzko and Tilly, 2005] Odlyzko, A. and Tilly, B. (2005). A refutation of metcalfeâs law and a better estimate for the value of networks and network interconnections. Manuscript, March, 2:2005.
- [Palamalai et al., 2021] Palamalai, S., Kumar, K. K., and Maity, B. (2021). Testing the random walk hypothesis for leading cryptocurrencies. Borsa Istanbul Review, 21(3):256â268.
- [Park and Irwin, 2007] Park, C.-H. and Irwin, S. H. (2007). What do we know about the profitability of technical analysis? Journal of Economic surveys, 21(4):786â826.
- [Pascucci and Palomba, ] Pascucci, A. and Palomba, M. Stochastic volatility jump models for cryptocurrency option pricing.
- [Pernagallo and Torrisi, 2020] Pernagallo, G. and Torrisi, B. (2020). Blindfolded monkeys or financial analysts: Who is worth your money? new evidence on informational inefficiencies in the us stock market. Physica A: Statistical Mechanics and Its Applications, 539:122900.
- [Pernice et al., 2020] Pernice, I. G. A., Gentzen, G., and Elendner, H. (2020). Cryptocurrencies and the velocity of money. In Cryptoeconomic Systems Conference.
- [Regnault, 1863] Regnault, J. (1863). Calcul des chances et philosophie de la bourse. Pilloy.
- [Samuelson, 2016] Samuelson, P. A. (2016). Proof that properly anticipated prices fluctuate randomly. In The world scientific handbook of futures markets, pages 25â38. World Scientific.
- [Shiller, 1980] Shiller, R. J. (1980). Do stock prices move too much to be justified by subsequent changes in dividends?
- [Shiller, 2015] Shiller, R. J. (2015). Irrational exuberance. In Irrational exuberance. Princeton university press.
- [Smales, 2019] Smales, L. A. (2019). Bitcoin as a safe haven: Is it even worth considering? Finance Research Letters, 30:385â393.
- [Steinbach, 2001] Steinbach, M. C. (2001). Markowitz revisited: Mean-variance models in financial portfolio analysis. SIAM review, 43(1):31â85.
- [Wiener, 1976] Wiener, N. (1976). Collected works, vol. 1, p. masani.
- [Woo et al., 2013] Woo, D., Gordon, I., and Laralov, V. (2013). Bitcoin: A first assessment fx and rates. Global Bank of America, Merrill Lynch.
- [Yermack, 2013] Yermack, D. (2013). Is bitcoin a real currency? an economic appraisal (no. w19747). National Bureau of Economic Research, 36(2):843â850.
- [Zargar and Kumar, 2019] Zargar, F. N. and Kumar, D. (2019). Informational inefficiency of bitcoin: A study based on high-frequency data. Research in International Business and Finance, 47:344â353.