Automated Bitcoin Trading Strategy using Neural Networks
Plot of bitcoin's price over time along with the reconstructed signal by a neural network, updated every 15 seconds. See below for the automatic trading results and explanation.
The portfolio is built by weighting six strategies: at any moment, each one is "long" or "short" and that is the information displayed in the following radar plot.
Bar plot of the portfolios' performance. At the top, the total portfolio is displayed. The six strategies are also displayed in the following horizontal bar plot; each six of them correspond to a threshold in latent space and their weights in the total portfolio was found via linear programming.
1) Reconstruct the Signal Using a Neural Network
A convolutional autoencoder was trained over 8-point windows of the BTC-USDT timeseries and a qualitatively-deemed reasonable reconstruction was obtained for the specially simple case of a 2-dimensional latent space (see image below). By the way, the reconstructed signal is the one labeled as "Autoencoder" in this website's upper chart.
2) Propose an Hypothesis in the Latent Space
After visualizing the data representation in the latent space (see image below), a model is proposed of a 1-dimensional manifold that can be parametrized by a straight line with an O(100) slope. By referring to their distance to the manifold, events can be tagged as potentially anomalous.
3) Fit a Trading Strategy using Linear Programming
Interpreting the distance to the linear manifold exceeding a certain threshold as an anomaly associated with trend reversal allows for the fitting of a multi-threshold weighted trading strategy using linear programming: the strategy might not be overfitted, i.e. it may be able to generalize in order to gain predictive power, as over the testing set the strategy outperformed the benchmark hypothesis ~60% of the times, where the benchmark hypothesis is the strategy of just being long. Disclaimer: the strategy does not consider transaction costs.