Font Size: a A A

The Design And Implementation Of Gold Futures Price Prediction System Based On GRU And Attention Mechanism

Posted on:2022-06-05Degree:MasterType:Thesis
Country:ChinaCandidate:Y F LiFull Text:PDF
GTID:2518306737978889Subject:Computer technology
Abstract/Summary:PDF Full Text Request
As an important part of the economic market,gold futures plays an increasingly important role in hedging from the perspective of investors or maintaining the stability of the economic market at the national level.Therefore,it is of great practical significance to predict the price of gold futures.This paper proposes a gold futures price predicting method based on IGRU-AM.In order to fully consider the influence of various factors in the financial market on the price change of gold futures,Pearson method is firstly used to analyze the correlation between the settlement price of gold futures and the measurable factors affecting the price change of gold futures.In this way,the impact factors are selected and the input dimension of the predict model is determined.Secondly,in order to fully explore the dependence of each sequence data in the time dimension,the gated recurrent unit(GRU)is improved.Improved gated recurrent unit(IGRU)adds a 1-tanh function operation in the reset gate of the GRU to change the retention ratio of the information at the previous moment.At the same time,IGRU changes the retention ratio of the information at different moments in the update gate.IGRU can more effectively retain the dependence between long-term and short-term information.Then,attention mechanism(AM)is introduced to obtain more comprehensive feature information.This paper selects the impact factor as the input,and the IGRU-AM prediction model is constructed.In order to verify the effectiveness of the model,the main contract of Shanghai Futures Gold Futures is used to conduct experiments.Gold futures and impact factors data from January 9,2008,to June 30,2021,are obtained through crawler technology and API interface provided by third-party financial data sites.Recurrent neural network(RNN),long short-term memory(LSTM),GRU,IGRU,LSTM-AM,and GRU-AM are selected as the benchmark model to predict the gold futures price respectively.The experiments results show that IGRU-AM can obtain a good prediction result for the settlement price of gold futures,which can provide an effective reference for the price prediction of gold futures.In order to apply the method presented in this paper to engineering projects,a gold futures price prediction system based on IGRU-AM is designed and implemented.Python language and Django framework are carried out to build the system,and Echarts is used to display the data graphically.The system updates and displays gold futures data in real-time,and calls the trained model to predict the settlement price of gold futures on the next trading day,which mainly implements functions such as data collection,data management,and price prediction.
Keywords/Search Tags:Deep learning, GRU, Attention mechanism, Time series prediction, Gold futures
PDF Full Text Request
Related items