Font Size: a A A

Research On Forecasting Stock Price Based On Data Mining

Posted on:2024-05-04Degree:MasterType:Thesis
Country:ChinaCandidate:W L FanFull Text:PDF
GTID:2558307058980709Subject:Applied Statistics
Abstract/Summary:PDF Full Text Request
With the rapid development of China’s economy and the continuous improvement of people’s living standards,more and more people have begun to invest in stocks,and China’s stock market has gradually developed and expanded.The stock market is characterized by high returns and high risks.How to accurately predict the future price of stocks,so as to reduce investment risks and increase investment returns has always been the most concerned issue for investors.This disserta-tion will use the relevant theoretical models in data mining to analyze the closing price of the Shanghai Composite Index and build a prediction model.Firstly,this dissertation crawls the daily data of the Shanghai Composite Index from Decem-ber 19,1990 to May 1,2022 from the Choice financial terminal,and obtains 24 technical indicators through certain mathematical operations according to the crawled data,and combines the crawled data and the constructed technical indicators to obtain the original data set containing 1 target variable and 31 feature variables.After data cleaning,the data are standardized,and the indicators are screened by using the correlation coefficient analysis method and the embedded feature selec-tion method,and finally the closing price dataset of the Shanghai Composite Index containing 9characteristic variables is obtained.Secondly,for the stock price prediction problem,the grid search and cross-validation methods are used to determine the parameters of the model,and three single models in machine learning:SVR,Ridge regression and Lasso regression,four ensemble models:RF,XGBoost,AdaBoost and LightGBM,and univariate LSTM model and multivariate LSTM model in deep learning are con-structed.Comparing the evaluation index values of each model,it is found that among the nine models constructed,the LightGBM model has the lowest MAE and MSE two index values,and the EVS and R~2 two index values are the highest,so it is considered that the LightGBM model is the model with the best effect on the closing price prediction of the Shanghai Composite Index among the nine models.Finally,for the stock price prediction problem,the Stacking method is used to construct the fusion model.Based on the nine models built in Chapter 4,15 fusion models are constructed in different combinations.By comparing the evaluation index values of 15 stacking fusion models,it is found that the Stacking fusion model with LightGBM,LSTM and AdaBoost models as pri-mary learners and SVR as secondary learners has the best prediction effect on the closing price of the Shanghai Composite Index and has strong robustness.Comparing the Stacking fusion model with the LightGBM model,it is found that its prediction effect is still the best,and the short-term forecast value of the closing price of the Shanghai Composite Index for a total of 164 trading days from May 4 to December 30,2022 is given,by calculating the relative error,79.2%of the 164sample data had a relative error of less than 5%,indicating that the Stacking fusion model had a good prediction effect on the Shanghai Composite Index.
Keywords/Search Tags:Shanghai Stock Exchange Index, Technical Indicators, LightGBM, LSTM, Stacking
PDF Full Text Request
Related items