Motivate more: why BTC price prediction is different from regular stock price prediction. As from bitcoin.org:
The price of a bitcoin can unpredictably increase or decrease over a short period of time due to its young economy, novel nature, and sometimes illiquid markets. Consequently, keeping your savings with Bitcoin is not recommended at this point.
Our first objective is to see if the common algorithms that work well on regular price prediction still works on BTC price.
We have attempted to analyze the bitcoin price from several different perspectives with different algorithms.
This is roughly a rule-based classifier based on the search interest index of keyword "bitcoin". The problem is to classify weekly price trend to be either rise or fall. The algorithm is originally proposed in a paper, and we modify it to fit in our problem setup.
Data used: weekly bitcoin price, weekly search interest index of keyword "bitcoin"
The algorithm works as follows:
- compute the average search interest of past k weeks:
s_avg
- compare search interest of current week
s_t
withs_avg
- if
s_t
>s_avg
(search interest increases), label next week asfall
- otherwise (search interest decreases), label next week as
rise
- if
possible extension and parameter tuning:
This only parameter that one can change is the k which decides how many previous weeks it takes to compute the previous average price. We can add one more parameter, which we call diff
. In the second step, we label next week's price as fall
iff s_t
> s_avg
+ diff
.
The first graph contains the ROC of the google trend classifier given different threshold diff
. For each threshold, we computed different TPR/FPR by plugging different values for parameter delta_t
.
The red line in the graph is the baseline "random-guess". It turns out the algorithm works worse than the baseline. We realize if we flip the algorithm logic, that is predict price rise if search interest increases, and falls otherwise, we get a better result. The updated ROC is showing below.
[TODO] add reasoning
Bayesian curve fitting is a statistical technique to learn the pattern of previous datasets and make prediction for future values based on the model learned.
Input: daily bit-coin price; Output: bit-coin price next day;
The algorithm works as follows:
- given the training data X and T, along with a new test point x, the goal is to predict the value of t. That is to evaluate the predictive distribution
p(t|x,X,T)
; - given the value of x, the corresponding value of t has a Gaussian distribution;
m(t) = beta*transpose(phi(x))*S*sum(phi(x_n)*t_n)
S_inverse = alpha*I + beta*sum(phi(x_n)*transpose(phi(x)))
phi(x) = [x^i...], i = 0, 1, ...M
- where
alpha = 0.005
,beta = 11.1
,I
is the unit matrix;
- the mean value is the predicted price for the next day.
The moving average algorithm is to calculate the average value within a window size and then move to the next time period for the fixed size. Combining the moving average and any short-term price predition algorithm, we are able to classify Bit-coin price trend weekly and monthly, which works as follows:
- sample the historical data weekly, which means the
sample rate
is 7; - predict each day's price for next week;
- calculate moving average this week go back N
ave_now
and next week go back Nave_future
; - if
ave_now > ave_future
, predict0: decrease
, otherwise1: increase
; - from results of each day next week,
vote
for the trend next week; - similarly
vote
for monthly trend withweight
[0.6;0.25;0.1;0.05].
We are using the absolute mean error
and relative error rate
to evalute our algorithms, and the two parameters are defined as follows:
absolute_mean_error = sum(abs(predict_price-price))/size(price)
average_relative_error = sum(abs(predict_price/price - 1))/size(price)
- download a fixed amount of historic data [done]
- basic financial analysis (done)
- google trend paper replicate (in progress)
- similar approach through analyzing news headlines (NYT, Guardian, etc) with sentiment analysis
- bayesian prediction, regression
- performance evaluation
- use WEKA to get some visualized results for regression;
- try SVM for price prediction;
- https://www.otexts.org/fpp/4/8
- http://www.kaggle.com/c/informs2010
- Glossary
- A replicate of google trend paper: link, discuss, another one
- bitcoin and google trend: link
- hacking google trend API: link
- critics of google trend paper: link
- https://www.google.com/finance/domestic_trends