Bayesian Regression and Bitcoin: Devevrat Shah and Kang Zhang
Bayesian Regression and Bitcoin: Devevrat Shah and Kang Zhang
Bayesian Regression and Bitcoin: Devevrat Shah and Kang Zhang
Bitcoin
Devevrat Shah and Kang
Zhang
Data
February 2014 till July 2014
Price of Bitcoin
Order book at the exchange
60 best prices and associated and associated
for ask
60 best prices and associated and associated
for bid
Trading strategy
Minimal position
-1, 0 or +1 Bitcoin
Else do nothing
89% return
Sharpe ratio =
std
Where
profit ave
1 N
= profit i
N i=1
1
riskfree = startprice endprice
N
N
profit
2
std
1
= ( profiti profitave )
N i=1
Regression
x R y R,
Given observation
Training labeled data
{ x1, y1},L ,{ x n , y n }
Approach from non-parametric statistics
d
y = f (x) +
Example
f (x) = x T *
Noise
standard Gaussian
n
2
Estimate
T
LS argmin ( y i x i )
R
Predict
i=1
T
x LS
y=
Bayesian Regression
x Rd y R ,
Given observation
Training labeled data
{ x1, y1},L ,{ x n , y n }
Bayesian Inference
PXY
ComputeP(y | x)
n
Use data as proxy
P(y | x) 1(y i = y, x i = x)
i=1
Predicty=
E p [Y | x ]
K sources x1,L , x K R d
with probabilities
{1,K , K }
Distribution over
,K}
{1,K
K distributions
P1,L ,PK
Choose
T
over
{1,K ,K } P(T = k) = k
Generate
X = sT +
standard Gaussian
Y ~ PT
Draw
each
R over
noise
where
is
Predicting Price
Gaussian
(BR-LSM)
? 1
2 ?
x x i 2 ?Noise
y i exp ?
? 4
?
i=1
E emp [y | x] = n
y
? 1
2 ?
x x i 2 ?
exp ?
? 4
?
i=1
X(x)y
y=
Current
Price
Historical
Data
future
prediction
Current
Price
future
prediction
(v bid v ask )
r=
book data
From order
compute
(v bid + v ask )
Predict
3
w j p j + w 4 r
p = w 0 +
j =1
Representative Patterns
Triangle