You are on page 1of 31

1

Table of Contents

Abstract…………………………………………………………………………………………....3

Introduction………………………………………………………………………………………..4

Literature Review…………………….…………………………………………………………....6

Data…………………………………………………………………………………………........11

Methods…………………………………………………………………………………………..12

Results…………………………………………………………………………………………....24

Conclusion……………………………………………………………………………………….28

Bibliography……………………………………………………………………………………..30

2
Abstract

Cyrptocurrencies and blockchain technology are currently extremely relevant topics for

academics and professionals alike. They offer the opportunity to disrupt middlemen in every

industry as well as promote a new understanding of how funds can be transferred. With this

market has come rampant speculation in the form of trading these burgeoning assets. This paper

studies how these markets have developed and how effective technical analysis is at predicting

price patterns. Using previous studies as a framework along with hourly and daily

cryptocurrency price data, it was determined that the classical technical analysis patterns do have

some ability to predict future price movements; however, more research is needed on both a

larger sample size and with a variety of other different test parameters.

3
Introduction

In 2009, a mysterious figure, known only as Satoshi Nakamoto (pen name), published a

ground-breaking research whitepaper entitled, “Bitcoin: A Peer-to-Peer Electronic Cash

System.”1 Nakamoto’s goal was to create a network allowing users to bypass financial

institutions using cryptography. To do so, Nakamoto built a technology called “Blockchain.”2

Blockchain technology came as a result of what is known as the “double-spend” problem.

Cryptocurrencies have been around since the 1950s, yet there was always a main underlying

issue: users could spend more than they currently had unless there was a trusted third party who

controlled the transactions.3 All electronic transactions prior to Bitcoin have had to use financial

institutions as their trusted third party.

Bitcoin is different as payment records are recorded in a master public ledger where past

payments are verified by a community of nodes. Each block contains the current transactions as

well as all previous transactions. Nodes maintain this network and keep roster of the

decentralized ledger, or blockchain. As long as there are more honest nodes in the network than

dishonest, the ledger will statistically prove the confirmation of past transaction. Bitcoin’s

technology is revolutionary and has the potential to upend many industries as they are known

today.

Bitcoin started as an obscure payment method obtainable only from those who held it as

well as rewards for operating a node. Slowly but surely, exchanges were built out of community

oriented websites. These early exchanges were not ready for the massive amount of volume and

1
Satoshi Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System," Bitcoin.org, last modified January 3, 2009,
accessed November 13, 2017, https://bitcoin.org/bitcoin.pdf.
2
Ibid.
3
Ibid.

4
interest. The largest exchange up until 2014 was Mt. Gox, now infamous for its lack of

cybersecurity. The exchange was cleared out by hackers, and billions worth of the currency were

stolen.4 This exchange prior to Bitcoin was designed for trading Magic: The Gathering cards.

Large institutions have stepped in and created a more regulated and sound environment for

trading the currency.

In 2018, there are now over 1,558 different tradable cryptocurrencies similar to Bitcoin

with a total market capitalization of $367 Billion.5 This overall market capitalization is greater

than all but 10 companies globally, and in the peak of the market on January 6th, the overall

market capitalization stood at roughly $800 Billion, or a greater market capitalization than any

other company in history other than Apple Inc.6 Given the large influx of institutional and retail

funds into the sector, many have looked at how cryptocurrency price formation occurs as well as

what trading strategies are successful.

This paper will focus on technical analysis and its application with cryptocurrencies.

Technical analysis is a school of trading strategies that focus on forecasting future prices trends

solely on the performance of past price trends. This is inherently different from fundamental

analysis where traders and investors attempt to forecast the future price based on the intrinsic

value of the asset.

The presumed father of the Technical analysis is Charles Dow, who in a series of Wall

Street Journal editorials laid out his six main theories regarding overall market movements, yet

4
The inside story of Mt. Gox, Bitcoin's $460 million disaster," Wired, last modified March 3, 2014, accessed April
20, 2018, https://www.wired.com/2014/03/bitcoin-exchange/.
5
"Cryptocurrency Market Capitalizations," Coin Market Cap, accessed April 19, 2018, https://coinmarketcap.com/.
6
Ibid.

5
these theories dictate that trends in past prices govern future prices in the market.7 Many further

expanded on these trends, but perhaps none were more influential than Robert Edwards, John

Magee, and W.H.C. Basset, and their book Technical Analysis of Stock Trends. Since its first

publication in 1948, this book has served as somewhat of a bible for technical traders. The book

itself lays out a series of classical technical chart patterns which indicate a “bullish” (positive) or

a “bearish” (negative) price movement to come in the future.8

Technical analysis and academics have been often at odds in the past, yet several

researchers have attempted to cross the divide between the two. Andrew Lo, Harry Mamaysky,

and Jiang Wang published a paper in August 2000, entitled Foundations of Technical Analysis:

Computational Algorithms, Statistical Inference, and Empirical Implementation, looking at the

empirical results of the classical chart patterns on historical data. In their study looking over a

31-year sample period, they found that “several technical indicators do provide incremental

information and may have some practical value.”9

This paper will attempt to recreate their study on the impact of classical technical chart

patterns and apply it to cryptocurrency price data using their algorithm definitions for each

pattern. The analysis will use python scripts to analyze historical data of the top 250

cryptocurrencies by market capitalization.

Literature Review

7
Andrew Beattie, "Giants of Finance: Charles Dow," Investopedia, last modified January 5, 2018, accessed April
19, 2018, https://www.investopedia.com/articles/financial-theory/08/charles-dow.asp.
8
Robert Edwards, John Magee, and W.H.C. Basset, Technical Analysis of Stock Trends, 9th ed. (n.p.: AMACOM,
2007).
9
Andrew W. Lo, Harry Mamaysky, and Jiang Wang, "Foundations of Technical Analysis: Computational
Algorithms, Statistical Inference, and Empirical Implementation," The Journal of Finance 55, no. 4: accessed April
19, 2018, https://www.cis.upenn.edu/~mkearns/teaching/cis700/lo.pdf.

6
Technical Analysis of Stock Trends10

The book itself has been revised many times from its original publication, but much

remains the same. The authors guide the reader through basics of technical analysis including the

Dow theory. The Dow theory has five main tenants including:

1. The averages discounts everything: the price will take in all current available

information, and any deviation will be corrected quickly.

2. The three trends: the “market” moves in three different trends: major, secondary, and

minor. Major trends are movements of greater than 20%. Secondary trends are

movements on an intermediate timeframe that are usually over several months. Minor

trends are day to day movements and fluctuations within the market.

3. The primary trends: These large overall movements are categorized by “bull”

(positive) and “bear” (negative) markets. According to Dow, we can and always are

in one of the two at any given point.

4. The secondary trends: These trends are defined as “intermediate ractions that

interrupt the progress of prices in the Primary Direction.” These are so called

“corrections” that last for three weeks to several months.

5. The minor trends: Minor trends are as previously stated, day to day changes within

the market. These trends are what most active traders actually trade off of and they

ultimately are the trends that change the most frequently and are uncorrelated with the

overall trend of the market.

10
Edwards, Magee, and Basset, Technical Analysis.

7
The book also focuses on numerous other important aspects of technical trading

including: classical chart patterns, trend lines, moving averages, entry and exits points, and

support and resistance levels. These topics are all important to the technical trader, but this paper

will only focus on the efficacy of classical chart patterns which the authors define as is stated in

the methods portion of this paper.

Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and

Empirical Implementation11

Lo, Mamaysky, and Wang looked to bridge the gap between academic finance and

technical analysis. Many in this new wave of quantitative finance dismiss technical analysis

entirely, yet these researchers looked to see if there were any sort of statistical significance to

classical chart patterns on a historical basis.

This paper forms the basis of the overall exploration in how to examine these chart

patterns historically. They first determined their sample set: several hundred U.S. stocks returns

from 1962 to 1966. From there, they then smoothed their data using smoothing estimators and

kernel regression. For them, they assessed their smoothed price series as a result of the following

equation:

𝑃𝑡 = 𝑚(𝑋𝑡 ) +∈𝑡

Where there is some sort of unknown nonlinear function of X and 𝜖𝑡 is white noise. The

researchers hoped to create a smoothed data series, by eliminating the white noise, in order to

then determine the actual technical analysis occurrences.

11
Lo, Mamaysky, and Wang, "Foundations of Technical.”

8
Automating this process, they then defined each technical pattern “in terms of its

geometric properties, for example, local extreme.” Applying the kernel smoother, they analyzed

the price series for each defined pattern to test for occurrences. The specific pattern definitions

are located in the methods section of this paper, but they used these local maxima and minima to

determine the pattern formation.

Once they determined all historical patterns within the dataset, the researchers then

looked at one-day returns after each pattern was detected. To do so, they defined a trading

window of 36 days where the returns were truncated after the immediate formation of the

pattern. The returns were standardized by taking the returns by subtracting the mean returns of

each period and dividing by the standard deviation. These returns were analyzed on an aggregate

basis and showed that for all ten patterns described in the study, abnormal patterns were

observed, especially for Nasdaq stocks.

The researchers admitted that these returns do contain some biases. The kernel regression

equation is forward looking, taking into accounts data points in the future and thus cannot lead to

deceiving results. Additionally, the researchers noted that the patterns themselves may not

always be the most effective patterns in terms of abnormal returns. They conclude that further

study should be done on computer generated patterns in order to see if there are potentially more

profitable solutions out there. This paper gives a solid foundation in terms of being able to

recognize potential patterns derived from definitions given by classical technical analysts.

The Economics of Bitcoin Price Formation12

12
Pavel Ciaian, Miroslava Rajcaniova, and d'Artis Kancs, "The Economics of Bitcoin Price Formation," Applied
Economics 48, no. 19 (April 2016): doi:10.1080/00036846.2015.1109038.

9
Ciaiana, Rajcaniova, and Kancs published their paper on the economic determinants of

Bitcoin price formation in Applied Economics in 2016. It is the first paper that looks at

traditional economic price determinants as well as “digital currency-specific factors.” The

researchers began by taking the previously identified Barro model for gold standard and applied

it towards Bitcoin daily data from 2009-2015. The adapted model is shown below where P is the

price level of goods and services, G is the size of the Bitcoin economy, V is the velocity of

Bitcoin circulation (frequency of turnover of one Bitcoin in terms of changing hands), and B

represents the total stock of Bitcoin in circulation.

𝑃𝐺
𝑝𝑡𝐵 =
𝑉𝐵

This model looks at relationships between supply and demand as well as actual “mining”

production. Expanding upon it, they created numerous coefficients to attempt to further reconcile

the unexplained price movements. One such coefficient looks to additionally account for news

cycles (negative, neutral, and positive). The final set of coefficients look to account for macro-

financial indicators such as interest rates, unemployment rates, and stock market indices

movements. Their analysis yielded statistically significant results.

Their first observation saw that Bitcoin price is more affected by demand side variables

(addresses created, transactions executed) rather than supply side. Changes in the number of

Bitcoins overall also caused upward pressure on Bitcoin price as well as increases in the overall

Bitcoin economy. The second hypothesis test found that as new posts about Bitcoin along with

views on Wikipedia and new members were statistically significant in their ability to increase the

price of Bitcoin. The third and final hypothesis found that no global macro-economic indicators

10
had any significant correlation with Bitcoin price formation. Stock market indices in particular

showed no correlation with Bitcoin price movements.

Foreign exchange forecasting models such as these do have some sort of application in

terms of attempting to find some sort of pricing predictability for cryptocurrencies. In particular,

it seems that these currencies react more to crypto-currency specific factors rather than

traditional equity factors. This could possibly mean that if the technical patterns work with

equities, they may not necessarily correlate to abnormal returns with cryptocurrencies.

Data

The data used for this paper were obtained from two main sources: CryptoCompare and

Quandl.1314 Quandl served as the main resource for gathering equity data. This equity data was

acquired using Quandl’s API. Quandl’s API is free to use and allows users to gather series of

price history of equities with ease. The main data used in the testing of the algorithms was

Quandl’s data for Microsoft from January 1st, 2003 to May 1st, 2016. This data was used in

conjunction with in order to test the accuracy of the adapted model written by Andrew Campbell

on Quantopian. Unfortunately, the adjusted close price for most equities varies depending on the

data source. Quandl’s data as well as Google and Yahoo Finance all deviated from each other.

Thus, this limited the usefulness of the testing itself when looking at equities. However, when

looking at a larger universe of equities, we can see the patterns and their own statistics.

To look at the larger equities universe, the data were comprised of the 100 companies

listed in the Nasdaq index. This data was aggregated for each individual company for the past 10

13
Quandl.
14
"Cryptocurrency Market," Coin Market Cap.

11
years (1/1/2008 – 12/31/2016). The data could possibly be affected by the overall market cycle

of this time sample, but these patterns are subjected to only a 36-day trading window and should

not be affected by yearly trends.15

The cryptocurrency price data were found using CryptoCompare’s API. CryptoCompare

is a data source for cryptocurrencies and offers a variety of tools. The API does limit the amount

of data points collected per ip address to 2,000. The price data consist of the price and timestamp

of the individual coin against a Bitcoin (BTC) trading pair. This is commonplace among

cryptocurrency exchanges, and very few coins are traded against fiat currency. Using Coin

Market Cap, a leading source of cryptocurrency market capitalization information, the top 250

coins were selected on January 6th, 2018. 16

These coins were processed in a loop where the past 2,000 hours of price data were

gathered from CryptoCompare as well as the past 2,000 days of price history (only hourly and

daily data available). As many of these coins have not been around long enough to have 2,000

days of price history, the daily dataset is significantly smaller in size than the hourly dataset.

These datasets after being processed were stored in a pickle file, a type of data storage similar to

a comma separated values file (CSV), in order to maintain a steady research environment as well

as provide a convenient way of storing the price data in system memory.

Methods

Much of the base algorithm used in this paper comes from two sources. The first is Lo,

Mamaysky, and Wang’s paper in The Journal of Finance and the other is from Andrew

15
Quandl.
16
"Cryptocurrency Market," Coin Market Cap.

12
Campbell’s research notebook posted on Quantopian.com.1718 This paper aims to replicate Lo,

Mamyskys, and Wang’s definitions for each algorithm detecting the classical chart patterns

described in Technical Analysis of Stock Trends. The algorithms had to use the new price data

collected as well as translated into python that can run locally on any computer.

Andrew Campbell adapted much of the research paper’s code into python and published

the source code on Quantopian.com. However, Quantopian.com runs a very specific version of

iPython as well, as their own proprietary suite of python packages and interfaces. The code

posted on their site must be heavily adapted in order to be run on a basic python interpreter.19

Once Campbell’s source code had been thoroughly debugged and adapted to python 2.7

on Windows 10, the data were then cleaned to ensure that each data point was part of a Pandas

series indexed by time. As Lo, Mamaysky, and Wang point out “The starting point for any study

of technical analysis is the recognition that prices evolve in a nonlinear fashion over time and

that the nonlinearities contain certain regularities or patterns.”20 To use the data in a manner

where patterns can be recognized, so called statistical noise in the price changes must be

accounted for.

Lo, Mamasky, Wang, and Campbellused smoothing estimators for these price series.21

Data smoothing is a method to remove this statistical noise from the data itself.22 This model

uses what is called kernel regression in order to achieve a smoothed dataset.

17
Lo, Mamaysky, and Wang, "Foundations of Technical.”
18
Campbell, "An Empirical," Quantopian.
19
Ibid.
20
Lo, Mamaysky, and Wang, "Foundations of Technical.”
21
Ibid.
22
"Data Smoothing," Investopedia, accessed April 20, 2018, https://www.investopedia.com/terms/d/data-
smoothing.asp.

13
Kernel smoothing estimation is a common tool for machine learning algorithms. It works

by taking in a series of past data points and applying a smoothing parameter known as bandwidth

as well as a regression of previous data points. This bandwidth factor is important because it tells

the model how close to fit the data. If the bandwidth is too large, not enough of the movement

will be captured (too flat) and if the bandwidth is too small, too much of the movement will be

captured as one can see in Figure 1.23

Figure 1. Smoothed Microsoft Price Data from 1/1/2012 to 4/31/2012

To pick an optimal bandwidth, most machine learning algorithms apply what is known as

Scott’s Rule which is implemented as follows

1
𝑛(−𝑑+4)

23
Arsalane Guidome, "Kernel Estimator and Bandwidth Selection for Density and its Derivatives," R-Project, last
modified October 30, 2015, accessed April 20, 2018, https://cran.r-
project.org/web/packages/kedd/vignettes/kedd.pdf.

14
Where n is equal to the number of data points in the dataset and d is the number of

overall dimensions.24 For our analysis, this bandwidth factor changed dynamically as the number

of data points fluctuated dynamically depending on the price history of the coin.

While kernel smoothing can be helpful in terms of smoothing historical data, it does

introduce a look-ahead bias as the kernel smoothing indicator will use forward data points to

produce its current smoothed ones.25 Another possible method is through moving averages.

Moving averages take the past data up to a certain limit and create an average that moves

along with the data as they move forward. While there are many different types of moving

averages, data scientists sometimes prefer to use exponential moving averages when it comes to

price series forecasting for the future as they are only backward looking.26 Two specific

exponential moving averages were used in this paper: exponentially weighted moving averages

and Holt-Winters moving averages.

Exponentially weighted moving averages use a fixed weight, 𝜆, as well as running and

current rational subgroup averages, 𝑥̄𝑖 , to calculate, 𝑧𝑖 , or successive observations. This leads to a

smoother data series. 27

𝑧𝑖 = 𝜆𝑥̄𝑖 + (1 − 𝜆)𝑧𝑖 −1

Additionally, the python-specific EWMA calculations use a span parameter, s. S relates

to the overall decay parameter of the graph. This decay leads to past data having less of an

24
D.W. Scott, Multivariate Density Estimation: Theory, Practice, and Visualization (New York: Wiley, 1992.
25
Lo, Mamaysky, and Wang, "Foundations of Technical.”
26
Ibid.
27
"Exponentially Weighted Moving Average," Value at Risk, accessed April 20, 2018, https://www.value-at-
risk.net/exponentially-weighted-moving-average-ewma/.

15
impact on the current moving average. Ultimately the span has the greatest effect on the fitting of

the smoothed data to the original as is seen in Figure 2.28

𝛼 = 2/(𝑠 + 1)

Figure 2. EWMA’s for Apple price data from 6/1/2012 to 11/1/2012

The coins next were dissected to determine local maximum and minimum of the

smoothed price data. The smoothed price data were passed through a function to determine the

local maximum and minimum of the price, and these values were stored in a larger dataframe.

This data was used to determine the exact days during which the actual maximum and minimum

occurred within the price series data. Figure 3 shows an example of what the kernel smoothed

price data looks like with these local maximum and minimums for a trading window.

Chart recognition focused on the following technical patterns: head and shoulders,

broadening top, broadening bottom, triangle top, triangle bottom, rectangle top, and rectangle

28
Ibid.

16
bottom. These patterns are all derived from classical technical analysis, Technical Analysis of

Stock Trends, and Lo, Maymasky, and Wang,29

Head and Shoulders patterns consist of the following extreme according to Lo, Mamaysky, and

Wang:

30

Head-and-Shoulders patterns consist of a left shoulder where the price moves up and

down slightly, a head, where the price ultimately peaks, and a right shoulder, where the price

temporarily rallies up before descending. The pattern forms a neckline overall as seen in Figure

2. In a Head-and-Shoulders pattern, the formation promotes a bearish (negative) forecast for the

price and can be seen again in Figure 2. Inverse Head-and Shoulder patterns do the exact same

thing, yet they follow the opposite pattern and promote a bullish (positive) trend.31 Figure 3

shows an example of an Inverse Head-and-Shoulder pattern.

29
Lo, Mamaysky, and Wang, "Foundations of Technical.”
30
Ibid.
31
Edwards, Magee, and Basset, Technical Analysis.

17
Figure 2. Head and Shoulders Pattern Observed on Ethereum (ETH)

Figure 3. Inverse Head and Shoulders Pattern observed on Ripple (XRP)

18
32

A Broadening Top is a bearish pattern where the price rallies and then sees two higher highs as

well as two lower lows. Volume falls throughout the formation, and confirmation occurs after the

price falls below E4. The opposite occurs in a Broadening Bottom pattern, but the alleged

psychology of both patterns dictates that traders see the price spiraling out of control and sell

during a Broadening Top and sees a drop spinning of out of control during a Broadening Bottom

where smart money buys in.33 Figure 4 shows the bearish Broadening Top while Figure 5 shows

the bullish Broadening Bottom.

Figure 4. Broadening Top observed on Bitcoin Cash (BCH)

32
Lo, Mamaysky, and Wang, "Foundations of Technical.”
33
Edwards, Magee, and Basset, Technical Analysis.

19
Figure 5. Broadening Bottom observed on Steemit Coin (STEEM)

34

Triangle Tops (also known as descending triangles) form where a horizontal support is found and

the price looks to continually test and bounce off of this support region. Sellers essentially are

testing a bottom repeatedly where volume and price rallies both fall until the horizontal support

breaks and there is a sharp drop as well as a spike in volume. Triangle Bottoms (also known as

ascending triangles) form where a horizontal resistance is found and the price continually looks

to break the resistance. They follow the exact inverse of Triangle Tops in terms of trading

34
Lo, Mamaysky, and Wang, "Foundations of Technical.”

20
psychology and pattern formation.35 Figures 6 and 7 show the Triangle Top and Triangle Bottom

respectively.

Figure 6. Triangle Top observed on Neo (NEO)

Figure 7. Triangle Bottom observed on Monero (XMR)

35
Edwards, Magee, and Basset, Technical Analysis.

21
36

Rounding Tops are bearish patterns that form when a security’s price increases to a resistance

level and slowly tapers off before forming a curve and then a sharp downturn somewhat like an

36
Lo, Mamaysky, and Wang, "Foundations of Technical.”

22
upside-down “U”. Rounding Bottoms form a “U” pattern and represent bullish price action.37

Figures 8 and 9 show the Rounding Top and the Rounding Bottom respectively.

Figure 8. Rounding Top observed on Tron (TRX)

Figure 9. Rounding Bottom observed on Dash (DASH)

37
Edwards, Magee, and Basset, Technical Analysis.

23
Results

To determine the effectiveness of the patterns, the normalized returns were computed for

each pattern for each coin. This was done in a similar manner as Lo, Maymasky, and Wang in

their study.38 The patterns were identified on a rolling trading window basis of no more than 36

days). To neutralize this look-ahead bias, an identification lag of four days was used to delay the

information for the kernel smoother. This identification lag allows the program to simulate back

testing without having a long/short setup in place. Additionally, other methods were used to

compare results including the utilization of Scott’s bandwidth rule instead of a fixed bandwidth

and Holt-Winter’s EMA model.

The overall results were mixed and varied significantly depending on the time period,

data smoothing techniques used, and the individual patterns. Figure 10 shows a boxplot chart of

the 1 hour normalized returns with the standard algorithm settings. The data appear to show

38
Lo, Mamaysky, and Wang, "Foundations of Technical.”

24
abnormal returns as well as a large range of potential outcomes. Figure 11 shows the results of

one sample T tests with the following hypotheses:

𝐻𝑜 : 𝜇 = 0.00

𝐻𝐴 : 𝜇 ≠ 0.00

Out of the eight patterns, five rejected the null hypothesis (α = 0.05) and suggested that

these returns significantly deviated from the expected population mean of 0% change. This could

be due to the aforementioned look-ahead bias of the kernel regression, poor identification lag

selection, or overall market conditions.

Figure 10. 1 Hour Normalized Returns (N = 250, Bandwidth = 1.8)

Figure 11. T Statistic Data for Hourly

25
T Test Data for 1 Hour Normalized Returns (N = 250, Bandwidth =1.8)
HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
T Statistic -5.43 2.98 -1.93 2.29 -7.06 3.21 -1.81 -2.15
P - Value 0 0.003 0.055 0.023 0 0.002 0.71 0.278

Figure 12. 1 Day Normalized Returns (N = 250, Bandwidth = 1.8)

Figure 13. T Statistic Data for Daily

T Test Data for 1 Day Normalized Returns (N = 250, Bandwidth = 1.8)


HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
T Statistic 1.07 -1.71 0.76 1.76 -2.61 1.71 -0.03 0
P - Value 0.293 0.105 0.447 0.081 0.01 0.089 0.974 N/A

Figure 14. T Statistic Data for Scott’s Rule Hourly

T Test Data for 1 Hour Normalized Returns (N = 250, Bandwidth = Scott's)


HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
T Statistic -2.48 -2.16 1.05 1.13 -0.55 -0.64 -1.76 -0.15
P - Value 0.014 0.031 0.295 0.258 0.585 0.526 0.078 0.88

Figure 15. 1 Day Normalized Returns (N = 250, Bandwidth = Dynamic/Scott’s Rule)

26
Figure 16. T Statistic Data for Scott’s Rule Daily

T Test Data for 1 Day Normalized Returns (N = 250, Bandwidth = Scott's)


HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
-2.48 -2.16 1.05 1.14 -0.55 -0.64 -1.76 -0.15
0.014 0.031 0.295 0.258 0.584 0.526 0.079 0.88

Figure 17. 1 Hour Normalized Returns (N = 250, Holt-Winters EMA Span = 13)

27
Figure 18. T Statistic Data for Holt-Winters Hourly

T Test Data for 1 Hour Normalized Returns (N = 250, Holt-Winters)


HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
T Statistic 0.8 0.02 -0.679 1.53 0.04 -1.76 -1.75 0.116
P - Value 0.427 0.982 0.5 0.13 0.965 0.082 0.084 0.909

Figure 19. 1 Day Normalized Returns (N = 250, Holt-Winters EMA Span = 13)

Figure 20. T Statistic Data for Holt-Winters Daily

T Test Data for 1 Day Normalized Returns (N = 250, Holt-Winters)


HS IHS BTOP BBOT TTOP TBOT RTOP RBOT
T Statistic 0.314 -0.22 0.03 -1.77 -1.44 -1.57 0.661 0
P - Value 0.756 0.832 0.979 0.079 0.152 0.118 0.525 N/A

Conclusion

The data present mixed results after hypothesis testing. Looking at the T test data for each

of the individual time frames and smoothing methods, the kernel regression appears to provide

the most significant results. All patterns showed statistically significant results (p-value < 0.05)

28
except for rounding tops/bottoms and broadening tops. On the vast majority of other timeframes

and smoothing methods, the results do not show statistically significant results.

The other smoothing methods in particular did not detect a similar number of patterns as

the kernel regression algorithm did. Ultimately, these other methods may be inferior in terms of

detecting historical patterns. If this is the case, the span for the moving average may need to be

adjusted to show similar patterns. It is also possible that one can could use the kernel regression

technique to create a library of significant historical patterns for use as training data for a

machine learning application. Kernel regression does have a forward bias, but this bias can be

eliminated if it is solely used for training data.

Technical chart patterns, with regards to cryptocurrencies, may produce abnormal

returns; however, pattern formation does not always lead to successful execution. Skilled traders

may have an edge using these patterns if they are able to determine ones that fully complete vs.

those that do not, as well as using risk management techniques.

Technical analysis will most likely continue to be popular among cryptocurrency traders,

and these patterns will continue to appear and be traded upon. After a few more years of price

data, future research may be able to better assess the empirical merits of technical analysis in this

market, but given the limited data history as well as the seemingly unlimited volatility, the data

remains inconclusive but do suggest potential.

29
Bibliography

Balcilar, Mehmet, Elie Bouri, Rangan Gupta, and David Roubaud. "Can Volume Predict Bitcoin
Returns and Volatility? A Quantiles-based Approach." Economic Modeling, March 27,
2017. Accessed November 13, 2017. doi:10.1016/j.econmod.2017.03.019.

Beattie, Andrew. "Giants of Finance: Charles Dow." Investopedia. Last modified January 5,
2018. Accessed April 19, 2018. https://www.investopedia.com/articles/financial-
theory/08/charles-dow.asp.

Campbell, Andrew. "An Empirical Algorithmic Evaluation of Technical Analysis." Quantopian.


Last modified May 17, 2016. Accessed April 19, 2018.
https://www.quantopian.com/posts/an-empirical-algorithmic-evaluation-of-technical-
analysis.

Ciaian, Pavel, Miroslava Rajcaniova, and d'Artis Kancs. "The Economics of Bitcoin Price
Formation." Applied Economics 48, no. 19 (April 2016): 1799-815.
doi:10.1080/00036846.2015.1109038.

"Cryptocurrency Market Capitalizations." Coin Market Cap. Accessed April 19, 2018.
https://coinmarketcap.com/.

"Data Smoothing." Investopedia. Accessed April 20, 2018.


https://www.investopedia.com/terms/d/data-smoothing.asp.

Edwards, Robert, John Magee, and W.H.C. Basset. Technical Analysis of Stock Trends. 9th ed.
N.p.: AMACOM, 2007.

"Exponentially Weighted Moving Average." Value at Risk. Accessed April 20, 2018.
https://www.value-at-risk.net/exponentially-weighted-moving-average-ewma/.

Guidome, Arsalane. "Kernel Estimator and Bandwidth Selection for Density and its
Derivatives." R-Project. Last modified October 30, 2015. Accessed April 20, 2018.
https://cran.r-project.org/web/packages/kedd/vignettes/kedd.pdf.

"The inside story of Mt. Gox, Bitcoin's $460 million disaster." Wired. Last modified March 3,
2014. Accessed April 20, 2018. https://www.wired.com/2014/03/bitcoin-exchange/.

Lo, Andrew W., Harry Mamaysky, and Jiang Wang. "Foundations of Technical Analysis:
Computational Algorithms, Statistical Inference, and Empirical Implementation." The
Journal of Finance 55, no. 4. Accessed April 19, 2018.
https://www.cis.upenn.edu/~mkearns/teaching/cis700/lo.pdf.

Nakamoto, Satoshi. "Bitcoin: A Peer-to-Peer Electronic Cash System." Bitcoin.org. Last


modified January 3, 2009. Accessed November 13, 2017. https://bitcoin.org/bitcoin.pdf.

30
Pieters, Gina, and Sofia Vivanco. "Financial Regulation and Price Inconsistencies across Bitcoin
Markets." Information Economics and Policy 39 (June 2017): 1-14. Accessed November
13, 2017. doi:10.1016/j.infoecopol.2017.02.002.

Quandl. Accessed April 20, 2018. https://www.quandl.com/.

"scipy.stats.gaussian_kde¶." SciPy. Accessed March 13, 2018.


https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html.

Scott, David W. Multivariate Density Estimation: Theory, Practice, and Visualization.

Scott, D.W. Multivariate Density Estimation: Theory, Practice, and Visualization. New York:
Wiley, 1992.

Singh, Gurchetan. "7 methods to perform Time Series forecasting (with Python codes)."
Analytics Vidhya. Accessed April 19, 2018.
https://www.analyticsvidhya.com/blog/2018/02/time-series-forecasting-methods/.

Urquhart, Andrew. "Price Clustering in Bitcoin." Economics Letters 159 (October 2017): 145-
48. Accessed November 13, 2017. doi:10.1016/j.econlet.2017.07.035.

31

You might also like