| With the continuous development of China’s market economy,the stock market is also gradually maturing.Stock investment also attracts people to continuously understand the stock market and buy and sell stocks because of its short cycle and high returns.However,most investors usually blindly choose because of the lack of professional knowledge of stocks,resulting in the loss of property,so in order to gain something in the extremely risky investment method of stock investment,understanding the stock trend is the most basic requirement.Behind the vast amount of data generated by the rapid development of the stock market is a lot of information that can be used,meaningful,and valuable.However,the use of traditional analysis methods can no longer solve the situation of a large amount of data,so how to use data mining technology to analyze and predict these historical stock data to help investors choose more suitable stocks to reduce investment risks is a problem worth studying.In this paper,the local outlier factor(LOF)algorithm is used to improve the KMeans algorithm,and the financial indicators in the fundamentals of stocks and the technical indicators KDJ in the technical aspects are clustered.The main contents are as follows: first,the financial indicators of stocks are applied to the correlation rules,and 10 financial indicators with strong correlation rules with the rise and fall of stocks are found,and then these financial indexes are clustered to find stock datasets suitable for long-term investment.Then,the value of the technical indicator KDJ is calculated by the obtained stock dataset suitable for long-term investment,and the clustering algorithm is applied to the calculated KDJ value,and the short-term volatility of the stocks in each cluster are judged according to the clustering results.Through the dual choice of fundamental and technical,find stock data sets suitable for both long-term and short-term investment.Finally,the K-Means algorithm before and after the improvement is compared and analyzed,and the improved K-Means algorithm model is better.This paper predicts the fluctuation trend of stock data through the improved KMeans clustering algorithm,improves the problems existing in traditional algorithm,and provides investors with reasonable suggestions for choosing stocks by selecting stock datasets with rising potential. |