Font Size: a A A

Research On The Trend Prediction Model Of Classified Unbalanced Stock Based On Machine Learning

Posted on:2021-11-29Degree:MasterType:Thesis
Country:ChinaCandidate:L Y FuFull Text:PDF
GTID:2518306047985869Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
In modern society,the stock has become one of the popular investment methods.If we can predict the trend of the stock price,it can not only regulate and guide the trading market at an appropriate time,but also guide the investment direction of investors and provide reference value for the healthy development of relevant economic fields.In view of the high-dimensional,noisy and low-stable characteristics of stock data,how to use machine learning to analyze and predict stock trends has become a hot topic in the new period.At present,most of the quantitative analysis and stock price rise and fall prediction techniques based on machine learning regard stock price rise and fall as a binary classification problem.However,in the past research of stock quantitative analysis,the problem of data set imbalance which may appear in this classification problem has not aroused enough attention.For example: within a period of time,the stock market will have a "bull market" or "bear market" special situation,in the "bull market",the probability that all stocks rise far more than the probability of falling,in the "bear market",on the contrary,most stocks are prone to falling.Due to the obvious imbalance of classification,it is difficult for the commonly used classification algorithms in the market to make accurate prediction in special cases,which can not help investors in "bull market" or "bear market" to better avoid risk or gain.In order to solve the problem of stock price prediction when the classification is unbalanced,this paper introduces the idea of cost-sensitive learning into the prediction model and does the following work:1.Data collection and feature selection.In liquor,brokerage,medicine,education,science and technology in the plate to select more representative of the five stocks,collect 2017full-year 249 trading days the highest price,the lowest price,closing price,volume and other data,cleaning nearly 300,000 pieces of data with a basic granularity of minutes,dividing the data sets,and carrying out feature engineering,establish the simple moving average(SMA),the weighted moving average(EWMA),stock momentum index(MOM)and the relative strength index(RSI)and other eight important features.2.A cost-sensitive function is proposed.Based on the processing method of cost-sensitive learning,the cost factor is constructed according to the actual distribution of the samples,and the weight distance is introduced into the calculation process of the cost function to construct a cost-sensitive function considering the importance of each feature,called the various factors weighted cost sensitive function.It can better capture the cost of miscalculation different classes in the problem and prevent a few classes from being ignored.3.Design two classification algorithms.By combining various factor weighted cost sensitive function with Support Vector Machine and Random Forest respectively,two cost sensitive classification algorithms are designed,cost Sensitive-Support Support Vector Machine and Cost Sensitive-Random Forest,and optimize the model on the training set;at the same time,design to add anti-malicious operation strategy,in order to prevent the result of market makers and investors from maliciously manipulating the market when they use the same model to predict the market.4.Evaluation indicators and test verification.In order to better evaluate the performance of the model in the problem of unbalanced classification,the AUC as evaluation index,on the stock data set,the two classifiers are compared with the stock trend prediction models commonly used in the market.The experimental results show that the two binary classification models designed in this paper have better effect,it can provide a reference for investors to forecast the rise and fall of stock price in the "bull market" or "bear market" market.
Keywords/Search Tags:Stock Price Trend Forecast, Disequilibrium of Classification, Cost-Sensitive, Support Vector Machine, Random Forest
PDF Full Text Request
Related items