ETH prediction

This article explores the long short-term memory (LSTM) network and how it can be used to make ETH market predictions comparing to ARMA model.

P1 Data preprocessing

Data set introduction: The Ethereum price dataset is collected from https://www.investing.com/crypto/ethereum/historical-data. The dates are from Jan 2016 to October 2021. The dataset is split into trainset and testset with a 0.85: 0.15 proportion

Statistic description

Using open price as the predicting target

Min_max scaler is applied for faster trainning speed.

Since this is a time series data, I assume the datapoint can be predicted by previous 60 datapoints. Why 60? In stock market, 60 day MACD line is an important feature to predict the price of a stock. I tried 20 datapoints as features (MACD 20 line is also important in stock analysis.), but the results are bad comparing to 60 datapoints.

P2.Build LSTM

LSTM (long short-term memory network) is a variant of RNN. RNN and conventional neural network is different from the layer of neurons between the establishment of a connection. The advantage is that it is convenient to use the sequence of before and after correlation analysis of time series. However, RNN ,due to gradient disappearance reasons, can only have short-term memory. LSTM network uses gate control of short-term memory and long-term memory combined, to solve the problem of gradient disappearance, resulting in better prediction sequence situation.

P3. Model Trainning

P4.Prediction

P5. Result Visualization

Comparing to ARMA model

P6 Results and Analysis

ARMA fitted results are good, following a true distribution (and proved by a very low MSE). In fact, it doesn't make sense to rely on the eth market price of the next day alone. Personally, what I want is not the exact stock price the next day, but whether the stock market price will rise or fall for the next 30 days. But if the task is to predict the next 2 days window, instead of just predicting the next day), ARMA will not be suitable. The long short-term memory model is an extremely powerful time series model. They can predict any future step.