SlideShare a Scribd company logo
Bitcoin Algorithmic
Trading with CoinTrader
and R
Tom Johnson, PhD
Bitcoin SF Dev Group
6-23-2014
Bitcoin Algo Trading Development
Objective:
Make Money,
Help Bitcoin,
Have Fun
Why focus on Price
rather than Pipes?
Price Volatility
Big deterrent to public acceptance
Smooth rise good for all!
Big Opportunities for:
Products - Derivatives, Transaction info
Services - Price guides, Block execution
Trading/Arb - Hedging, Funds, Day-trade
Coins - Medium of xchg vs Store of value
What does R have to contribute?
R is Open Source, Global, Data Science
R script - Interactive, Algo development,
Prototyping, Live control, Easy to migrate
Packages - 5800, 120k functions
Community - Statistics & Machine Learning
Pros - Stable, fast math, answers/resources
Cons - Single threaded, in-memory, silos
R tools well matched to Bitcoin challenges
So are others like Python and ?
So how volatile is Bitcoin?
Compared with EURUSD?
Compared with Gold?
Comparing Bitcoin, EUR & Gold
But getting out of, or into
BTC will cost you
And what you see isn’t
what you get
And nothing’s isolated; it impacts
other Crypto, Home, Cross Pairs
So what does Bitstamp’s BTCUSD
Orderbook look like?
Demo with CoinTrader CSV file in AWS
With all the turbulence -
What about arbitrage opportunities?
And there’s Triangular Arbitrage --
Demo Example
Priceonomics.com --
Find best 2-currency plus Bitcoin arbitrage
among 3 currencies in live price feed:
Find most profitable sequence of transactions
from any Chosen Home Currency, through an
Intermediate Currency, then through Bitcoin
and finally back to the Home Currency.
Exchange Rates at a Point in Time
{
USD_JPY: "95.7422091",
USD_USD: "1.0000000",
JPY_EUR: "0.0080872",
BTC_USD: "105.5641218",
...
}
R Script
xchgTable <- xchgTable()
foreignCurrs <- allCurrs[!allCurrs %in% c(input$homeCurr, "BTC")]
foreignAmts <- btcAmts <- endHomeAmts <- rep(0, length(foreignCurrs))
names(foreignAmts) <- names(btcAmts) <- names(endHomeAmts) <- foreignCurrs
for (foreignCurr in foreignCurrs) {
foreignAmts[foreignCurr] <- xchgTable[input$homeCurr, foreignCurr] *
as.numeric(input$initHomeAmt)
btcAmts[foreignCurr] <- xchgTable[foreignCurr, "BTC"] * foreignAmts[foreignCurr]
endHomeAmts[foreignCurr] <- xchgTable["BTC", input$homeCurr] *
btcAmts[foreignCurr]
}
maxArbCurr <- foreignCurrs[which.max(endHomeAmts)]
cat(c("Trade", input$initHomeAmt, input$homeCurr, "to", round(foreignAmts[maxArbCurr],2),
maxArbCurr, "to", round(btcAmts[maxArbCurr],6), "BTC", "to",
round(endHomeAmts[maxArbCurr], 2), input$homeCurr, "which =",
round(((endHomeAmts[maxArbCurr]/as.numeric(input$initHomeAmt) - 1) * 100), 2), "% Gross
Gain"), "nnn")
Running in Amazon Cloud
AWS - Account, EC2, private key, static IP
Stack -
AMI (Medium), Windows Server, Firefox,
Google Drive, R, Shiny, RStudio, Apps
Set up URL with AWS namespaces
Demo -- www.next1up.com
Demo
Run Shiny App in cloud
Access through browser
Basic - Calculate & Display
Next - Monitor, Control & Execution
Machine Learning can help
Prediction & Classification
Lots of raw, currrent data (CoinTrader
CSV)
Code up savvy features
Forget the scholarly models
Use many non-linear methods
Don’t overfit or let the future leak in!
Cross-validate, analyze resduals
Performance going forward is what
matters!
Steps to build robust Algos & Rules
to Trade, Hedge, Place Limit Orders
Feature primitives -
Full feature variables - Differences, EMAs, etc.
Data - Training, Testing, Reserved data test
Variables - Bagging, Boosting, Selection
Models - Trees, RF, GLM, GA, GP, Ensemble
Use final code or live signal in CoinTrader
The Take-Away
Buy when under valued;
Sell when over valued.
Price changes faster and,
for reasons other, than value.
Good information & analysis can help.
The bigger the mispricing,
the bigger the opportunity
Whether trading, products, services or
coins.
Making money helps us all and Bitcoin!
Sources
Tom Johnson PhD
Tom@AI-Realtime.com
Arbitrage Demo http://next1up.net
https://www.linkedin.com/in/tom-johnson-62a16
Prices www.cryptocoincharts.info
APIs www.quandl.com/markets/bitcoin
Cool www.bitlisten.com
Analyses www.priceonomics.com
Shiny www.rstudio.com/shiny

More Related Content

Viewers also liked

A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
Quantopian
 
Axure Predictive Search Demo
Axure Predictive Search DemoAxure Predictive Search Demo
Axure Predictive Search Demo
Jonathan Lupo
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with Docker
Docker, Inc.
 
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
Quantopian
 
Pairs trading using R
Pairs trading using R Pairs trading using R
Pairs trading using R
Algoix Technologies LLP
 
Algorithmic Trading and FIX Protocol
Algorithmic Trading and FIX ProtocolAlgorithmic Trading and FIX Protocol
Algorithmic Trading and FIX Protocol
EXANTE
 
My Personal Forex Trading Plan
My Personal Forex Trading PlanMy Personal Forex Trading Plan
My Personal Forex Trading Plan
Ruben Topaz
 
Global Trading Club
Global Trading ClubGlobal Trading Club
Global Trading Club
Chistiamsc S.C.
 
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Strata 2013: Tutorial-- How to Create Predictive Models in R using EnsemblesStrata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Intuit Inc.
 
Getting Started with Amazon Machine Learning
Getting Started with Amazon Machine LearningGetting Started with Amazon Machine Learning
Getting Started with Amazon Machine Learning
Amazon Web Services
 
How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?
QuantInsti
 
Backtesting Trading Strategies with R
Backtesting Trading Strategies with RBacktesting Trading Strategies with R
Backtesting Trading Strategies with Reraviv
 
Amazon Machine Learning
Amazon Machine LearningAmazon Machine Learning
Amazon Machine Learning
Amazon Web Services
 

Viewers also liked (13)

A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
 
Axure Predictive Search Demo
Axure Predictive Search DemoAxure Predictive Search Demo
Axure Predictive Search Demo
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with Docker
 
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
Peculiarities of Volatilities by Ernest Chan at QuantCon 2016
 
Pairs trading using R
Pairs trading using R Pairs trading using R
Pairs trading using R
 
Algorithmic Trading and FIX Protocol
Algorithmic Trading and FIX ProtocolAlgorithmic Trading and FIX Protocol
Algorithmic Trading and FIX Protocol
 
My Personal Forex Trading Plan
My Personal Forex Trading PlanMy Personal Forex Trading Plan
My Personal Forex Trading Plan
 
Global Trading Club
Global Trading ClubGlobal Trading Club
Global Trading Club
 
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Strata 2013: Tutorial-- How to Create Predictive Models in R using EnsemblesStrata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
Strata 2013: Tutorial-- How to Create Predictive Models in R using Ensembles
 
Getting Started with Amazon Machine Learning
Getting Started with Amazon Machine LearningGetting Started with Amazon Machine Learning
Getting Started with Amazon Machine Learning
 
How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?
 
Backtesting Trading Strategies with R
Backtesting Trading Strategies with RBacktesting Trading Strategies with R
Backtesting Trading Strategies with R
 
Amazon Machine Learning
Amazon Machine LearningAmazon Machine Learning
Amazon Machine Learning
 

Similar to Bitcoin San Francisco Dev Talk 6-23-14, Tom Johnson

Cryptocurrency Mixing
Cryptocurrency MixingCryptocurrency Mixing
Cryptocurrency Mixing
ashmoran
 
Adopting F# at SBTech
Adopting F# at SBTechAdopting F# at SBTech
Adopting F# at SBTech
Antya Dev
 
Bitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfestBitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfest
Alberto Gomez Toribio
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
Tal Shmueli
 
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
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
Dace Barone
 
Introduction to trader bots with Python
Introduction to trader bots with PythonIntroduction to trader bots with Python
Introduction to trader bots with Python
roskakori
 
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
Justin Ehrenhofer
 
Ethereum: Coding Society
Ethereum: Coding SocietyEthereum: Coding Society
Ethereum: Coding Society
gavofyork
 
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
Justin Ehrenhofer
 
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
Justin Ehrenhofer
 
ICO Research Report - BET Token Issuance by DAO.Casino
ICO Research Report - BET Token Issuance by DAO.Casino ICO Research Report - BET Token Issuance by DAO.Casino
ICO Research Report - BET Token Issuance by DAO.Casino
Token Rating
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackersgavofyork
 
Dexpools
Dexpools  Dexpools
Dexpools
SiennaEdith
 
Presentation topalidis giorgos
Presentation topalidis giorgosPresentation topalidis giorgos
Presentation topalidis giorgos
Giorgos Topalidis
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosGiorgos Topalidis
 
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
Justin Ehrenhofer
 
Rails in the enterprise
Rails in the enterpriseRails in the enterprise
Rails in the enterprise
alexrothenberg
 
Bitcoin Startup Landscape - Q2 2014
Bitcoin Startup Landscape - Q2 2014Bitcoin Startup Landscape - Q2 2014
Bitcoin Startup Landscape - Q2 2014
Tracxn
 
Tracxn - Cryptocurrencies Startup Landscape
Tracxn - Cryptocurrencies Startup LandscapeTracxn - Cryptocurrencies Startup Landscape
Tracxn - Cryptocurrencies Startup Landscape
Tracxn
 

Similar to Bitcoin San Francisco Dev Talk 6-23-14, Tom Johnson (20)

Cryptocurrency Mixing
Cryptocurrency MixingCryptocurrency Mixing
Cryptocurrency Mixing
 
Adopting F# at SBTech
Adopting F# at SBTechAdopting F# at SBTech
Adopting F# at SBTech
 
Bitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfestBitcoin protocol for developers at techfest
Bitcoin protocol for developers at techfest
 
Crypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies IntroCrypto & Crpyocurrencies Intro
Crypto & Crpyocurrencies Intro
 
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
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
Introduction to trader bots with Python
Introduction to trader bots with PythonIntroduction to trader bots with Python
Introduction to trader bots with Python
 
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
Monero Presentation by Justin Ehrenhofer - Barcelona, Spain 2017
 
Ethereum: Coding Society
Ethereum: Coding SocietyEthereum: Coding Society
Ethereum: Coding Society
 
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
Monero Presentation by Justin Ehrenhofer - Copenhagen, Denmark 2017
 
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
Monero Presentation by Justin Ehrenhofer - Brussels, Belguim 2017
 
ICO Research Report - BET Token Issuance by DAO.Casino
ICO Research Report - BET Token Issuance by DAO.Casino ICO Research Report - BET Token Issuance by DAO.Casino
ICO Research Report - BET Token Issuance by DAO.Casino
 
Ethereum hackers
Ethereum hackersEthereum hackers
Ethereum hackers
 
Dexpools
Dexpools  Dexpools
Dexpools
 
Presentation topalidis giorgos
Presentation topalidis giorgosPresentation topalidis giorgos
Presentation topalidis giorgos
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_Giorgos
 
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
Monero Presentation by Justin Ehrenhofer - Stockholm, Sweden 2017
 
Rails in the enterprise
Rails in the enterpriseRails in the enterprise
Rails in the enterprise
 
Bitcoin Startup Landscape - Q2 2014
Bitcoin Startup Landscape - Q2 2014Bitcoin Startup Landscape - Q2 2014
Bitcoin Startup Landscape - Q2 2014
 
Tracxn - Cryptocurrencies Startup Landscape
Tracxn - Cryptocurrencies Startup LandscapeTracxn - Cryptocurrencies Startup Landscape
Tracxn - Cryptocurrencies Startup Landscape
 

Recently uploaded

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
 
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
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
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
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
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
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
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
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 

Recently uploaded (20)

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...
 
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.
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
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...
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
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
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
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...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 

Bitcoin San Francisco Dev Talk 6-23-14, Tom Johnson

  • 1. Bitcoin Algorithmic Trading with CoinTrader and R Tom Johnson, PhD Bitcoin SF Dev Group 6-23-2014
  • 2. Bitcoin Algo Trading Development Objective: Make Money, Help Bitcoin, Have Fun
  • 3. Why focus on Price rather than Pipes? Price Volatility Big deterrent to public acceptance Smooth rise good for all! Big Opportunities for: Products - Derivatives, Transaction info Services - Price guides, Block execution Trading/Arb - Hedging, Funds, Day-trade Coins - Medium of xchg vs Store of value
  • 4. What does R have to contribute? R is Open Source, Global, Data Science R script - Interactive, Algo development, Prototyping, Live control, Easy to migrate Packages - 5800, 120k functions Community - Statistics & Machine Learning Pros - Stable, fast math, answers/resources Cons - Single threaded, in-memory, silos R tools well matched to Bitcoin challenges So are others like Python and ?
  • 5. So how volatile is Bitcoin? Compared with EURUSD?
  • 7.
  • 8.
  • 10. But getting out of, or into BTC will cost you
  • 11. And what you see isn’t what you get
  • 12. And nothing’s isolated; it impacts other Crypto, Home, Cross Pairs
  • 13. So what does Bitstamp’s BTCUSD Orderbook look like? Demo with CoinTrader CSV file in AWS
  • 14. With all the turbulence - What about arbitrage opportunities?
  • 15. And there’s Triangular Arbitrage -- Demo Example Priceonomics.com -- Find best 2-currency plus Bitcoin arbitrage among 3 currencies in live price feed: Find most profitable sequence of transactions from any Chosen Home Currency, through an Intermediate Currency, then through Bitcoin and finally back to the Home Currency.
  • 16. Exchange Rates at a Point in Time { USD_JPY: "95.7422091", USD_USD: "1.0000000", JPY_EUR: "0.0080872", BTC_USD: "105.5641218", ... }
  • 17. R Script xchgTable <- xchgTable() foreignCurrs <- allCurrs[!allCurrs %in% c(input$homeCurr, "BTC")] foreignAmts <- btcAmts <- endHomeAmts <- rep(0, length(foreignCurrs)) names(foreignAmts) <- names(btcAmts) <- names(endHomeAmts) <- foreignCurrs for (foreignCurr in foreignCurrs) { foreignAmts[foreignCurr] <- xchgTable[input$homeCurr, foreignCurr] * as.numeric(input$initHomeAmt) btcAmts[foreignCurr] <- xchgTable[foreignCurr, "BTC"] * foreignAmts[foreignCurr] endHomeAmts[foreignCurr] <- xchgTable["BTC", input$homeCurr] * btcAmts[foreignCurr] } maxArbCurr <- foreignCurrs[which.max(endHomeAmts)] cat(c("Trade", input$initHomeAmt, input$homeCurr, "to", round(foreignAmts[maxArbCurr],2), maxArbCurr, "to", round(btcAmts[maxArbCurr],6), "BTC", "to", round(endHomeAmts[maxArbCurr], 2), input$homeCurr, "which =", round(((endHomeAmts[maxArbCurr]/as.numeric(input$initHomeAmt) - 1) * 100), 2), "% Gross Gain"), "nnn")
  • 18. Running in Amazon Cloud AWS - Account, EC2, private key, static IP Stack - AMI (Medium), Windows Server, Firefox, Google Drive, R, Shiny, RStudio, Apps Set up URL with AWS namespaces Demo -- www.next1up.com
  • 19. Demo Run Shiny App in cloud Access through browser Basic - Calculate & Display Next - Monitor, Control & Execution
  • 20.
  • 21. Machine Learning can help Prediction & Classification Lots of raw, currrent data (CoinTrader CSV) Code up savvy features Forget the scholarly models Use many non-linear methods Don’t overfit or let the future leak in! Cross-validate, analyze resduals Performance going forward is what matters!
  • 22. Steps to build robust Algos & Rules to Trade, Hedge, Place Limit Orders Feature primitives - Full feature variables - Differences, EMAs, etc. Data - Training, Testing, Reserved data test Variables - Bagging, Boosting, Selection Models - Trees, RF, GLM, GA, GP, Ensemble Use final code or live signal in CoinTrader
  • 23. The Take-Away Buy when under valued; Sell when over valued. Price changes faster and, for reasons other, than value. Good information & analysis can help. The bigger the mispricing, the bigger the opportunity Whether trading, products, services or coins. Making money helps us all and Bitcoin!
  • 24. Sources Tom Johnson PhD Tom@AI-Realtime.com Arbitrage Demo http://next1up.net https://www.linkedin.com/in/tom-johnson-62a16 Prices www.cryptocoincharts.info APIs www.quandl.com/markets/bitcoin Cool www.bitlisten.com Analyses www.priceonomics.com Shiny www.rstudio.com/shiny