Font Size: a A A

An Empirical Analysis Of Stock Price Forecasting Based On Supervised And Unsupervised Learning

Posted on:2020-11-26Degree:MasterType:Thesis
Country:ChinaCandidate:Z H HaoFull Text:PDF
GTID:2439330572990612Subject:Financial mathematics and financial engineering
Abstract/Summary:PDF Full Text Request
Since stocks have been well known as an investment tool,the stock market has gradually penetrated into the lives of the public,and by virtue of its asset allocation and price rediscovery,it also plays an important role in the national economy.More and more people try to dig out hidden and valuable information from the large,incomplete and vague stock historical data,so as to forecast the stock price,and further obtain considerable returns in the stock market.However,the non-linearity and complexity of the volatility of stock data can reflect that stock price prediction is not as simple as expected.In recent years,machine learning is also a rapidly rising branch.Its application scope and propaganda in mass media determine that machine learning algorithm will make great progress in the near future.At the same time,machine learning algorithm has been widely used in the field of stock price by virtue of its inductive computing ability.The learning algorithms fit the corresponding parameters according to the input and output data,so that the training model achieves the minimum error.However,there are many kinds of regression algorithms in the field of machine learning,how to select models suitable for stock data and with high prediction accuracy under uncertain future stock price trends has become a problem that people need to consider and solve at this stage.The main problem to be solved in this paper is to compare the accuracy of three supervised learning algorithms:support vector machine,k-nearest neighbor regression and decision tree model in stock price forecasting,including single model and combination model combined with clustering method.Since reviewing various stock forecasting methods and elaborating the contents of relevant algorithms under supervised learning and unsupervised learning,this paper uses single support vector machine,k-nearest neighbor regression and decision tree algorithm to train and test the historical data of Shanghai Composite Index and S&P 500 Index,and compares the forecasting accuracy,error value and operation efficiency of the three algorithms under different parameter settings.The prediction accuracy of support vector machine of kernel function with Gauss kernel function and k-nearest neighbor algorithm with distance weighted regression is better.Then the regression and clustering algorithms are combined.Firstly,the dimensionality of the original data is reduced by using principal component analysis and k-means clustering in unsupervised learning,and then combined with support vector machine algorithm with Gauss kernel function,k-nearest neighbor algorithm of distance-weighted regression and decision tree algorithm respectively.This paper horizontally compares the prediction results of each combination model,the experiment fully proves that the support vector machine based on principal component analysis and k-nearest neighbor regression model based on k-means clustering have obvious advantages in model evaluation and prediction accuracy.Longitudinal comparison shows that most of the combined models have better prediction results than single models.Comparing the results of different clustering algorithms combined by the same regression algorithm,we can see the SVM has little influence on the combination of PCA or k-means.The accuracy of the kNN regression model based on k-means clustering is better than that based on PCA.The decision tree model based on k-means clustering can get more accurate results than the model based on PCA.The innovations of this paper lie in the following two aspects:(1)This paper is different from the previous research directions of scholars.It combines clustering algorithm and regression algorithm in unsupervised learning algorithm,and uses combination algorithm to predict stock prices,further compares the predicted results from different directions;(2)This paper chooses relatively Shanghai Composite Index and S&P 500 Index data with sufficient and fresh sample data.It is more representative than a single stock,and the conclusion is more convincing.
Keywords/Search Tags:Supervised Learning, Unsupervised Learning, Stock Price Forecasting
PDF Full Text Request
Related items