Predicting Bitcoin prices

Stuff I am working on
Post Reply
Daniel Wee
Site Admin
Posts: 2186
Joined: Wed 25 Feb 25 2009 8:00 pm

Predicting Bitcoin prices

Post by Daniel Wee » Mon 28 Oct 28 2019 4:38 pm

So far we have a multi-variate input model where we are feeding in the OHLC as well as the buy and sell volume on a per-minute basis.

I have had to scale the price separately from the volume, due to the vastly different scales involved. This is achieved using two different instances of MinMaxScaler and applying them onto the relevant slices of data. When interpolating the results, you only need to reverse transform for the price since we are not necessarily wanting to predict the future volume.

Our current set up in test involves a 60-point (1-minute each) history input for a 4-point (hence 4-minutes) future prediction. Prediction quality is iffy at this point - appearing to have some sort of success but really not better than a human could do. In fact worse.

This could be due to two related aspects - the model architecture as well as the nature of the input data. Model architecture could be tweaked to better identify patterns in the time series and the relationship between consecutive or sequential data points within a series. The other aspect, which is related, is how the data is pre-processed. If we could pre-process the data to highlight the sequential patterns, that might make it easier for the neural network to work with those patterns.

This means we can test two areas, specifically - trying different model architectures, perhaps with separate layers of feature extraction and some convolution before feeding into the LSTM layers. We might also try other approaches - combining LSTM and RNN to see if it might handle sequences better. In this respect, we might want to look at projects that deal with text sequences, and that predict them. This might yield some useful architectures for sequence-to-sequence neural networks.

https://blog.keras.io/a-ten-minute-intr ... keras.html
https://github.com/JayParks/tf-seq2seq


The similarity with translational processes include the abstraction of a text sequence into meanings before predicting an output. I would imagine that this could work well with price prediction.

Secondarily, we should explore ways to represent trends. This could also be used for our classical heuristic algorithms that could work in conjunction with the neural network predictor as validation.
Daniel Wee
Site Admin
Posts: 2186
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Predicting Bitcoin prices

Post by Daniel Wee » Mon 28 Oct 28 2019 4:51 pm

Another direction to explore is to use neural networks for time series classification, which essentially getting it to recognize patterns.

https://burakhimmetoglu.com/2017/08/22/ ... ensorflow/

The challenge with this is the labelling of the categories - firstly to determine what categories should be recognized, and then to create a suitably labelled training set.
Daniel Wee
Site Admin
Posts: 2186
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Predicting Bitcoin prices

Post by Daniel Wee » Mon 28 Oct 28 2019 7:09 pm

This may provide ideas as to how to reconfigure the model layers by adding LSTM layers:-

https://github.com/keras-team/keras/issues/3522
Post Reply