Font Size: a A A

Stock Price Prediction Based On Support Vector Machine And K-nearest Neighbor Algorithm

Posted on:2021-03-26Degree:MasterType:Thesis
Country:ChinaCandidate:P Q ZhangFull Text:PDF
GTID:2370330602973793Subject:Statistics
Abstract/Summary:PDF Full Text Request
In this paper,we use the support vector machine(SVM)and k-nearest neighbor(KNN)algorithm to study the stock price prediction.In this paper,we choose two ways to study.First,we build a prediction model based on technical analysis,select the trading data and technical indicators of the stock index and securities,including closing price,trading volume,maximum price,moving average(MA),etc.,and use support vector machine to predict the up and down trend.According to the up and down trend,we combine k-nearest neighbor algorithm to predict the closing price and open price of the stock in one day,seven days and 30 days The average absolute error(MAE)and root mean square error(RMSE)are 0.043 and 0.05 respectively.In particular,after the establishment of the technical analysis model,20 stock companies are selected to set two different investment strategies according to the price range and closing price,and the simulated investment for one month results in 0.06 and 0.09 income;secondly,the comprehensive prediction model is established based on the financial data,and the transaction data and financial indicators of ten companies are selected,including closing price,trading volume,net asset income and profit earnings per share are predicted by support vector machine.According to the trend and k-nearest-neighbor algorithm,the average absolute error and root mean square error of the model are 0.16 and 0.21 respectively.Like the technical analysis,10 stock companies are selected in the comprehensive analysis to set the investment strategy according to the predicted up and down trend and closing price,and carry out the simulation investment for two and half years,and the income is 0.6.Therefore,according to the prediction results of the model,we can get some benefits and prove the validity of the model.
Keywords/Search Tags:machine learning, support vector machine, k-nearest neighbor, basic analysis, technical analysis, investment strategy
PDF Full Text Request
Related items