Font Size: a A A

Strategy Design Of Virtual Currency Investment Portfolio Based On PLSTM-ATT

Posted on:2022-01-27Degree:MasterType:Thesis
Country:ChinaCandidate:X HeFull Text:PDF
GTID:2510306479950979Subject:MSc in Finance (Statistics and Modelling)
Abstract/Summary:PDF Full Text Request
Since Bitcoin was proposed in 2008,it has led the trend of the times.As a kind of cryptocurrency,it is produced based on blockchain technology and has the characteristics of scarcity.It has received great attention from the market and has brought a certain impact to traditional currencies.Since then,virtual currencies represented by Bitcoin have also continued to be produced,and there are more than 3,000 kinds of them today.Since the machine learning algorithm was proposed,many scholars have been studying the application of machine learning algorithms to the financial market.During this period,a variety of algorithms have been produced,which has promoted the development of quantitative investment.The traditional time series neural network has a lot of room for improvement in the field of prediction.Improving the neural network to improve the prediction effect has far-reaching practical significance.This article uses an improved LSTM(Long Short-Term Memory Neural Network)model,denoted as PLSTM(Long Short-term Memory Neural Network with Peephole),and compares a variety of neural networks,such as basic LSTM,GRU(Threshold Regression Unit),etc.The price of a virtual currency is predicted using the tensorflow2.0 framework.At the same time,for better prediction and training efficiency,rolling prediction and data dimension normalization are used to process the data.Due to the advantages of the attention mechanism in the field of machine learning,this article adds the attention mechanism to the four models to ensure that the learning rate(lr=0.001)and other parameters are consistent.Compare the same number of iterations as 300 to judge Accuracy in predicting prices.Finally,this article aims at the result of the optimal error rate of a certain currency,and adds it to the Backtrader backtesting framework to conduct a backtest of portfolio returns,and compares the returns of different trading strategies,as well as the virtual currency investment portfolio and a single virtual currency.,Choose 5 kinds of stop loss rate(1%,2%,2.25%,2.5%and 3%),and analyze from the comparison effect.Taking Bitcoin as an example,the improved PLSTM has a certain improvement in the iterative efficiency of prediction accuracy.In the case of the same number of iterations(epochs=300),PLSTM achieved the smallest RMSE of 355.03 and MAE of 234.78.In the iterative process,when the loss value is less than 1e-3 for the first time,the shortest time is4.547385 seconds,which proves the effectiveness of the model from two perspectives,which is a better direction for improvement.At the same time,it is found that PLSTM-ATT(PLSTM combined with attention mechanism)has the highest prediction accuracy among the eight models,with RMSE of 351.18,MAE of 229.33,and an error rate of 0.016495.During the backtesting period of different trading strategies,the size of the rate of return is different,the highest is the BOLL(Bolling Band)trading strategy with 10 virtual strategies,and the return has doubled.And the difference in the stop loss rate may lead to the difference between positive and negative returns.In the actual operation process,you need to pay more attention to selection.This article compares different neural network models and comparative analysis of different trading strategies to provide investors with some algorithm and strategy recommendations.
Keywords/Search Tags:Virtual currency, Recurrent neural network, Attention mechanism, Backtrader strategy backtest, Portfolio
PDF Full Text Request
Related items