SlideShare a Scribd company logo
Analysis in
Cryptocurrency Markets
The “Bitcoin Brothers”
Keita Makino
1
Cryptocurrency
• Bitcoin (BTC)
• Starts from 2009, originally introduced by “Satoshi
Nakamoto”
• Blockchain system enables us to make online
transactions without any third-party authorization
process
A→B
1.0BTC
B→C
3.0BTC
A→C
0.5BTC
Bitcoin Blockchain
New block in every 10 minutes
2
Dataset
• Price of BTC/JPY at coincheck.com
• Collected on 11/13/2017
• Data every 10 seconds → in total 8640 data points
3
Analysis
• Is this a Random Walk?
• Financial data is often said to be a random walk data
• ADF test to determine the probability where the data is
a R.W.[1]
[1] RでGARCHモデル - TokyoR #21
https://www.slideshare.net/horihorio/garch-by-r
4
Analysis
• Is this a Random Walk?
• Take a return to make it non R.W.
• 𝑦 𝑡 =
𝑥 𝑡
𝑥 𝑡−1
− 1
5
Analysis
• ACF and PACF
• Possibly (P,Q) = (2,0), (0,2), (5,0) or (0,5)?
Otherwise P,Q>0
6
Analysis
• auto.arima
• (P,Q) = (2,3), (4,1), (0,5), (5,0), (0,3) or (2,0)?
7
Analysis
• sarima
• (P,Q) = (0,3) and (2,0) have a problem in p-values
• The others have some problem in variance and QQ
• Try GARCH model to reduce these issues
8
Analysis
• sarima
• (P,Q) = (0,3) and (2,0) have a problem in p-values
• The others have some problem in variance and QQ
• Try GARCH model to reduce these issues
9
Analysis
• GARCH
• What should be for GARCH(P,Q)?
• Difficult to find them → for loop[1]
• Determine the best model based on BIC.
[1] RでGARCHモデル - TokyoR #21
https://www.slideshare.net/horihorio/garch-by-r
10
Analysis
• GARCH
• Assume t distribution for the residual as it’s a financial
data[2]
not normal
[2]資産価格の実証分析/金融経済論 II
http://www.ier.hit-u.ac.jp/~iwaisako/class/Efinance2008/Efinance04_08dist.pdf
11
Analysis
• Best ARMA+GARCH model
• ARMA(2,3) + GARCH(1,1)
12
Analysis
• Best ARMA+GARCH model
• ARMA(4,1) + GARCH(1,1)
13
Analysis
• Best ARMA+GARCH model
• ARMA(0,5) + GARCH(1,1)
14
Analysis
• Best ARMA+GARCH model
• ARMA(5,0) + GARCH(1,1)
ARMA(4,1) + GARCH(1,1)
15
Analysis
• Residuals with ARMA(4,1) + GARCH(1,1)
• Left: ARMA, Right: ARMA + GARCH
Looks identical…
16
Analysis
• Difference of the Residuals
Some improve?
17
Analysis
• QQ plot with ARMA(4,1) + GARCH(1,1)
• Left: normal distribution VS ARMA(4,1)
• Right: t distribution VS ARMA(4,1) + GARCH(1,1)
18
Analysis
• Histogram with ARMA(4,1) + GARCH(1,1)
19
Analysis
• Prediction with ARMA(4,1) + GARCH(1,1)
Almost no meaning when it comes to prediction
20
Cryptocurrency
• Is there only Bitcoin?
21
Cryptocurrencies
• Bitcoin Cash (BCH)
• Starts from August 1st, 2017, having been hard forked
from original BTC.
A→B
1.0BTC
B→C
3.0BTC
A→C
0.5BTC
Bitcoin Blockchain
A→D
1.5BCH
E→B
2.3BCH
Bitcoin Cash Blockchain
Fork on 08/01
22
Cryptocurrencies
• Better Bitcoin can overtake the original?
• BCH has up-to-date specifications.
A→B
1.0BTC
A→C
1.BCH
B→D
2.0BTC
C→A
0.7BTC
B→C
1.2BTC
C→A
1.8BCH
E→B
0.9BCH
D→E
2.3BCH
8x block size → faster transaction
A→B
0.5BCH
D→B
0.9BCH
C→E
0.4BCH
C→D
3.0BCH
23
Bitcoin War
• BTC/BCH exploded in mid-November
https://www.cryptocompare.com/coins/bch/charts/BTC?p=1M
over 0.4 BTC/BCH
24
Bitcoin War
• Price of BCH/USD at bittrex.com
• Same structure to the BTC/JPY data
25
Bitcoin War
• Comparison in the plots
26
Strategy
• Use a bias in the markets
• JPY has much less market share on BCH
Drastic change in BCH/USD price can trigger a negative
effect to BCH,/JPY but the other way would not be
happen
https://www.cryptocompare.com/coins/
27
Strategy
• Is that true?
• Let’s see the CCF
→The least CCF values appear at lag=2 and 3
28
Strategy
• Scatterplot
• Negative relationship is especially typical when
BCH/USD price is relatively high or low
29
Strategy
• Base Algorithm
Look at the high and low price of
BCH/USD in recent 10 minutes
Look at the average price of
BCH/USD in recent 30 seconds
Is that much higher/lower than the
average of past 30 seconds?
Is the difference high?
Buy/Sell BTC/JPY
F
T
T
F
30
Strategy
• Build an application for automatic trading
31
Result
• Initial fund = approx. 95,000 JPY (0.634 BTC)
• +6,000 JPY in one day
32
Result
• Buy low, sell high
Buy
Sell
33
Conclusion
• The price of bitcoin can be fit with ARMA + GARCH
model, assuming the residual follow a t distribution.
• However, it is virtually useless to forecast a market
trend.
• Comparison with another market can enable us to
predict a bias in the short time ahead if there is a
special condition, such as a currency is drastically
increasing its market share.
• To win in this field, it is most important to keep up
to latest trends and information.
34
The end ?
35
Appendix
• Which is the winner of the war?
$ 9,910.81
$ 1,505.46
as of 11/28/2017
36
Thank you for your attention.
37

More Related Content

Similar to Time Series Analysis in Cryptocurrency Markets

Coinietrade Project Overview
Coinietrade Project OverviewCoinietrade Project Overview
Coinietrade Project Overview
Keisuke Sasaki
 
Bitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for DevelopersBitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for Developers
Paradigma Digital
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
Kingsley Davies
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
keepsmile22
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
Tal Shmueli
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Alex Chepurnoy
 
Blockchain: The Next Generation
Blockchain: The Next GenerationBlockchain: The Next Generation
Blockchain: The Next Generation
Yann Rouillard
 
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
Seldon
 
sta slide ref.pdf
sta slide ref.pdfsta slide ref.pdf
sta slide ref.pdf
quandao25
 
Lecture-5-STA.pdf
Lecture-5-STA.pdfLecture-5-STA.pdf
Lecture-5-STA.pdf
KarthikYogesh3
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Understanding Blockchain
Understanding BlockchainUnderstanding Blockchain
Understanding Blockchain
Tony Willenberg
 
[Data Meetup] Data Science in Finance - Building a Quant ML pipeline
[Data Meetup] Data Science in Finance -  Building a Quant ML pipeline[Data Meetup] Data Science in Finance -  Building a Quant ML pipeline
[Data Meetup] Data Science in Finance - Building a Quant ML pipeline
Data Science Society
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
Len Bass
 
“A bitcoin mining rig”
“A bitcoin mining rig”“A bitcoin mining rig”
“A bitcoin mining rig”
glitterlabs
 
Ndss 2016 game_bot_final_no_video
Ndss 2016 game_bot_final_no_videoNdss 2016 game_bot_final_no_video
Ndss 2016 game_bot_final_no_video
Eun-Jo Lee
 
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
DataScienceConferenc1
 
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Alex Chepurnoy
 
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
Masanori HIRANO
 
Crypto arbitrage
Crypto arbitrageCrypto arbitrage
Crypto arbitrage
YashSonawane3
 

Similar to Time Series Analysis in Cryptocurrency Markets (20)

Coinietrade Project Overview
Coinietrade Project OverviewCoinietrade Project Overview
Coinietrade Project Overview
 
Bitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for DevelopersBitcoin protocol for developerBitcoin Protocol for Developers
Bitcoin protocol for developerBitcoin Protocol for Developers
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
Blockchain For Developers (Talk at Innopolis Blockchain Hackathon 2016)
 
Blockchain: The Next Generation
Blockchain: The Next GenerationBlockchain: The Next Generation
Blockchain: The Next Generation
 
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
TensorFlow London 11: Pierre Harvey Richemond 'Trends and Developments in Rei...
 
sta slide ref.pdf
sta slide ref.pdfsta slide ref.pdf
sta slide ref.pdf
 
Lecture-5-STA.pdf
Lecture-5-STA.pdfLecture-5-STA.pdf
Lecture-5-STA.pdf
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
Understanding Blockchain
Understanding BlockchainUnderstanding Blockchain
Understanding Blockchain
 
[Data Meetup] Data Science in Finance - Building a Quant ML pipeline
[Data Meetup] Data Science in Finance -  Building a Quant ML pipeline[Data Meetup] Data Science in Finance -  Building a Quant ML pipeline
[Data Meetup] Data Science in Finance - Building a Quant ML pipeline
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
 
“A bitcoin mining rig”
“A bitcoin mining rig”“A bitcoin mining rig”
“A bitcoin mining rig”
 
Ndss 2016 game_bot_final_no_video
Ndss 2016 game_bot_final_no_videoNdss 2016 game_bot_final_no_video
Ndss 2016 game_bot_final_no_video
 
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
[DSC Europe 23][Cryptica] Aleksandar_Damjanovic_Token_Engineering_Unveiling_t...
 
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
Proof-of-Stake & Its Improvements (San Francisco Bitcoin Devs Hackathon)
 
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
 
Crypto arbitrage
Crypto arbitrageCrypto arbitrage
Crypto arbitrage
 

Recently uploaded

原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
GetInData
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Enterprise Wired
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 

Recently uploaded (20)

原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 

Time Series Analysis in Cryptocurrency Markets

  • 1. Analysis in Cryptocurrency Markets The “Bitcoin Brothers” Keita Makino 1
  • 2. Cryptocurrency • Bitcoin (BTC) • Starts from 2009, originally introduced by “Satoshi Nakamoto” • Blockchain system enables us to make online transactions without any third-party authorization process A→B 1.0BTC B→C 3.0BTC A→C 0.5BTC Bitcoin Blockchain New block in every 10 minutes 2
  • 3. Dataset • Price of BTC/JPY at coincheck.com • Collected on 11/13/2017 • Data every 10 seconds → in total 8640 data points 3
  • 4. Analysis • Is this a Random Walk? • Financial data is often said to be a random walk data • ADF test to determine the probability where the data is a R.W.[1] [1] RでGARCHモデル - TokyoR #21 https://www.slideshare.net/horihorio/garch-by-r 4
  • 5. Analysis • Is this a Random Walk? • Take a return to make it non R.W. • 𝑦 𝑡 = 𝑥 𝑡 𝑥 𝑡−1 − 1 5
  • 6. Analysis • ACF and PACF • Possibly (P,Q) = (2,0), (0,2), (5,0) or (0,5)? Otherwise P,Q>0 6
  • 7. Analysis • auto.arima • (P,Q) = (2,3), (4,1), (0,5), (5,0), (0,3) or (2,0)? 7
  • 8. Analysis • sarima • (P,Q) = (0,3) and (2,0) have a problem in p-values • The others have some problem in variance and QQ • Try GARCH model to reduce these issues 8
  • 9. Analysis • sarima • (P,Q) = (0,3) and (2,0) have a problem in p-values • The others have some problem in variance and QQ • Try GARCH model to reduce these issues 9
  • 10. Analysis • GARCH • What should be for GARCH(P,Q)? • Difficult to find them → for loop[1] • Determine the best model based on BIC. [1] RでGARCHモデル - TokyoR #21 https://www.slideshare.net/horihorio/garch-by-r 10
  • 11. Analysis • GARCH • Assume t distribution for the residual as it’s a financial data[2] not normal [2]資産価格の実証分析/金融経済論 II http://www.ier.hit-u.ac.jp/~iwaisako/class/Efinance2008/Efinance04_08dist.pdf 11
  • 12. Analysis • Best ARMA+GARCH model • ARMA(2,3) + GARCH(1,1) 12
  • 13. Analysis • Best ARMA+GARCH model • ARMA(4,1) + GARCH(1,1) 13
  • 14. Analysis • Best ARMA+GARCH model • ARMA(0,5) + GARCH(1,1) 14
  • 15. Analysis • Best ARMA+GARCH model • ARMA(5,0) + GARCH(1,1) ARMA(4,1) + GARCH(1,1) 15
  • 16. Analysis • Residuals with ARMA(4,1) + GARCH(1,1) • Left: ARMA, Right: ARMA + GARCH Looks identical… 16
  • 17. Analysis • Difference of the Residuals Some improve? 17
  • 18. Analysis • QQ plot with ARMA(4,1) + GARCH(1,1) • Left: normal distribution VS ARMA(4,1) • Right: t distribution VS ARMA(4,1) + GARCH(1,1) 18
  • 19. Analysis • Histogram with ARMA(4,1) + GARCH(1,1) 19
  • 20. Analysis • Prediction with ARMA(4,1) + GARCH(1,1) Almost no meaning when it comes to prediction 20
  • 21. Cryptocurrency • Is there only Bitcoin? 21
  • 22. Cryptocurrencies • Bitcoin Cash (BCH) • Starts from August 1st, 2017, having been hard forked from original BTC. A→B 1.0BTC B→C 3.0BTC A→C 0.5BTC Bitcoin Blockchain A→D 1.5BCH E→B 2.3BCH Bitcoin Cash Blockchain Fork on 08/01 22
  • 23. Cryptocurrencies • Better Bitcoin can overtake the original? • BCH has up-to-date specifications. A→B 1.0BTC A→C 1.BCH B→D 2.0BTC C→A 0.7BTC B→C 1.2BTC C→A 1.8BCH E→B 0.9BCH D→E 2.3BCH 8x block size → faster transaction A→B 0.5BCH D→B 0.9BCH C→E 0.4BCH C→D 3.0BCH 23
  • 24. Bitcoin War • BTC/BCH exploded in mid-November https://www.cryptocompare.com/coins/bch/charts/BTC?p=1M over 0.4 BTC/BCH 24
  • 25. Bitcoin War • Price of BCH/USD at bittrex.com • Same structure to the BTC/JPY data 25
  • 26. Bitcoin War • Comparison in the plots 26
  • 27. Strategy • Use a bias in the markets • JPY has much less market share on BCH Drastic change in BCH/USD price can trigger a negative effect to BCH,/JPY but the other way would not be happen https://www.cryptocompare.com/coins/ 27
  • 28. Strategy • Is that true? • Let’s see the CCF →The least CCF values appear at lag=2 and 3 28
  • 29. Strategy • Scatterplot • Negative relationship is especially typical when BCH/USD price is relatively high or low 29
  • 30. Strategy • Base Algorithm Look at the high and low price of BCH/USD in recent 10 minutes Look at the average price of BCH/USD in recent 30 seconds Is that much higher/lower than the average of past 30 seconds? Is the difference high? Buy/Sell BTC/JPY F T T F 30
  • 31. Strategy • Build an application for automatic trading 31
  • 32. Result • Initial fund = approx. 95,000 JPY (0.634 BTC) • +6,000 JPY in one day 32
  • 33. Result • Buy low, sell high Buy Sell 33
  • 34. Conclusion • The price of bitcoin can be fit with ARMA + GARCH model, assuming the residual follow a t distribution. • However, it is virtually useless to forecast a market trend. • Comparison with another market can enable us to predict a bias in the short time ahead if there is a special condition, such as a currency is drastically increasing its market share. • To win in this field, it is most important to keep up to latest trends and information. 34
  • 36. Appendix • Which is the winner of the war? $ 9,910.81 $ 1,505.46 as of 11/28/2017 36
  • 37. Thank you for your attention. 37

Editor's Notes

  1. This topic. Have you ever heard about bitcoin recently? Yes, cryptocurrency is a hot topic this year.
  2. Bitcoin is a kind of currency, originally introduced by Satoshi Nakamoto and that is powered by a blockchain system. Blockchain is a continuously growing set of records. People can view all the history of the records, but cannot edit it anymore. Using this, we now able to make a online payment without any 3rd party authorization such as governments, banks, public companies and so forth.
  3. Because it is regarded as a currency, there is a exchange of bitcoin. So today’s objective is this time series. The records were collected via coincheck.com on 11/13/2017, showing the price of BTC in JPY, frequency is every 10 seconds thus the total amount is 8640 records.
  4. Firstly, it is often said that financial data is actually behaves as a random walk. So let’s see if the data is so. Here we have a ADF-test and get these p-values, indicating that there are some possibility of being a random walk.
  5. Then, taking a return of the price make it non-random walk data, as you see the p-values are now very small.
  6. Next, look at ACF and PACF, it should be reasonable to consider these four, either AR or MA models, or otherwise ARMA model.
  7. Using auto arima gives us some possibility of ARMA model here, ARMA 2,3 or 4,1 .
  8. Then examine the diagnosis of these models. As you see, there is a problem in p-values when we select 0,3 or 2,0.
  9. The others have a problem in residuals and QQ Plots. Then considering GARCH may help us at finding a better model.
  10. However, it is difficult to say generally which P,Q for GARCH is good for this data. Therefore, we have create all the models with all possible combinations of P,Q from 1,1 to 4,3 and compared their BIC to find the best model.
  11. At this procedure, we have assumed that the residual follows a t distribution. It is because in this dataset most of the records are very close to 0.
  12. After the step of for loop, we indeed got P,Q = 1,1 for all ARMA models. This is 2,3 + 1,1.
  13. 4,1 + 1,1, looks good.
  14. 0,5 + 1,1. You see there is a fault here.
  15. And 5,0 1,1. It has some problem here too. So, our best model should be ARMA 4,1 + GARCH 1,1.
  16. Then let’s see the diagnostics. Residuals with and without GARCH look identical at a glance, but
  17. Actually there is a difference. And… it probably make some positive effects for stabilize the variance.
  18. QQ plot. Actually it is difficult to say something. Which one do you think better?
  19. Histogram of the residuals. It is also hard to find a significance, but at least not too far from the distribution.
  20. However, when it comes to prediction, we clearly see it says little about the future. Yes, forecasting a price of bitcoin could never be so easy that we can do for the term project, unfortunately.
  21. But, you know, there is another way. Yes, there are more and more currencies than bitcoin in the world. From now on, we’ll talk on this, bitcoin cash, a brother of the bitcoin.
  22. Bitcoin cash is a relatively new cryptocurrency which was born in this august being hard forked from the original bitcoin. It means the blockchain of bitcoin cash has all the history of bitcoin blockchain before this july.
  23. And because it is 8 years newer than bitcoin, its specification was greatly improved to endure increasing transactions in these days. So, this younger brother is much better than the older one. Some people welcomed this currency and enthusiastically invested, then.
  24. The price of BCH suddenly exploded in this November. The ratio between BTC and BCH radically increased up to 4 to 5 times in 48 hours.
  25. And this is our second data, collected via bittrex.com and shows the price of BCH in USD. Does anybody notice something? So
  26. These trends have a negative relationship.
  27. And here is our strategy. This pie chart explains the currency share in the cryptocurrencies. You see now JPY has the greatest volume in trading BTC, but never appear in the right chart, the share in BCH. It indicates that changes in BCH market can trigger a following change in BTC market, but the other way would not be happen.
  28. How to confirm this assumption? See this CCF in the prices. The bottom, least values on the CCF lie around lag=2 or 3. It proves that there is about 30 seconds delay in propagating BCH/USD effect to BTC/JPY market.
  29. And this is the scatterplot of the prices with 30 seconds lag. Showing there are typically negative relations when BCH gets high or low price.
  30. Then try this flow chart. First look at relatively long trend in BCH, if it finds a high volatility, then see in shorter span and detect an abrupt change in the price of BCH to trade BTC.
  31. So we improved this... And let it run on Microsoft Azure web app.
  32. And here is the result. In the day, we made about 30 closed trades and succeeded in increasing the fund about 6%.
  33. This chart illustrates how the system bought and sold. Although there might be some suggestion, overall sell point is relatively higher than buy point,
  34. In conclusion, we have evaluated an ARMA + GARCH model that can explain the bitcoin price. However, it is not enough to predict the future trend. Then, comparison between two currencies, especially either of them is drastically changing its price, would help us at finding the short-term prediction easily. Therefore, you must be up-to-date if you want to win in this field.
  35. The end? Well, can you guess which one finally won this war? [Okay, so imagine today we have a new currency USD Next, which doesn’t have any physical object and there is no store which accept it yet, but it is completely secure, easy to use on the web, high anonymity, brah brah brah... Do you wanna investigate all your asset to this currency?] Yes, the name value is much much overwhelming...
  36. Bitcoin. Now going to be 10 thousands.
  37. Thanks.