当前位置:网站首页>Traditional machine learning classification model predicts the rise and fall of stock prices under more than 40 indicators
Traditional machine learning classification model predicts the rise and fall of stock prices under more than 40 indicators
2022-06-13 00:55:00 【Your name is Yu yuezheng】
Preface
The stock market is surging , Only a good forecast of the stock price can we better seize the profit opportunity . So what is the effect of the traditional machine learning classification model in this respect ?
This paper considers the moving average 、 Exponential moving average 、DMI、MACD、KDJ、RSI etc. More than 40 indicators Under the circumstances , Comparison of the Support vector machine 、 Decision tree 、 Random forests Three models predict the effect of stock price fluctuation
disclaimer
Nothing in this vision and analysis should be interpreted as investment advice , Past performance does not necessarily indicate future results .
Support vector machine 、 Decision tree 、 Stochastic forest model predicts stock price
We choose Maotai stock (600519) As an object of study , The data date range is 2020-01-01 To 2020-12-30. Uniform adoption of the last 55 Day data as test set , Last 64 The data of days ago is used as the training set
Support vector machine
Support vector machine (SVM) It is a kind of generalized linear classifier which classifies data according to supervised learning , The decision boundary is the maximum margin hyperplane for learning samples
In order to increase the nonlinearity of the model , use RBF Kernel function , The effect of the model is as follows
Compared with the previous article using only six indicators , from 42.47% The accuracy of is improved to 49.9%.
Decision tree
Decision tree (Decision Tree) On the basis of knowing the probability of occurrence of various situations , The probability that the expected value of NPV is greater than or equal to zero is calculated by constructing decision tree , Evaluate project risks , The decision analysis method to judge its feasibility , It is a graphic method of intuitively using probability analysis . Because this kind of decision branch is like a tree's branch , So it's called decision tree . In machine learning , Decision tree is a prediction model , It represents a mapping relationship between object attributes and object values
The depth of the defined number is 5, The effect of the model is as follows
Compared with the previous article, which only used six indicators , Overall, there is still some improvement
The accuracy on the training set ranges from 77.53% Greatly increased to 97.66%
The accuracy on the test set ranges from 56.25% Improved a little 56.36%
But the recall rate from 53.53% To improve the 56.35%
Random forests
Random forest is a classifier that contains multiple decision trees , And the output category is determined by the mode of the output category of the individual tree
Define the depth of the tree as 5, The number of random trees is 10, The effect of the model is as follows
Compared with the previous article, which only used six indicators , Overall, there is still some improvement
The accuracy on the training set ranges from 86.52% Greatly increased to 100%
The accuracy on the test set ranges from 57.81% Improved a little 58.18%
But the recall rate from 56.76% To improve the 58.40%
summary
After a simple test , The effect of random forest is relatively optimal
But there are still big problems in the prediction effect , The improvement effect is very small , Explain the need for more appropriate machine learning methods
边栏推荐
- 单片机串口中断以及消息收发处理——对接受信息进行判断实现控制
- 三角波与三角波卷积
- Kotlin coroutine withcontext switch thread
- How to determine whether T is a value type in a generic type or a reference class- How to determine whether T is a value type or reference class in generic?
- Build your own PE manually from winpe of ADK
- How to handle different types of data
- Opencv face recognition of ros2 foxy~galactic~humble
- Go simple read database
- 408 true question - division sequence
- 深度学习训练多少轮?迭代多少次?
猜你喜欢

How many steps are appropriate for each cycle of deep learning?

Expression tree - medium order printout

Maybe we can figure out the essence of the Internet after the dust falls

Triangle wave and triangle wave convolution

Opencv face recognition of ros2 foxy~galactic~humble

Aunt learning code sequel: ability to sling a large number of programmers

MySQL异常:com.mysql.jdbc.PacketTooBigException: Packet for query is too large(4223215 > 4194304)

DNS attack surface analysis

Binary tree -- using hierarchical sequence and middle sequence to determine a tree

Common skills of quantitative investment -- Drawing Part 1: Drawing stock closing price curve and ochl candle chart
随机推荐
[JS component] previous queue prompt
AOF持久化
MySQL locates the position of the character in the string String substitution
Influence of higher order poles on waveform
Blinker FAQs
[JS] battle chess
Andersen Global通过在芬兰和丹麦的合作协议拓展北欧地区业务版图
Can GPU acceleration pytorch work?
With a market value of more than trillion yuan and a sales volume of more than 100000 yuan for three consecutive months, will BYD become the strongest domestic brand?
Bubble sort - alternate sort at both ends
ImportError: cannot import name ' get_ ora_ doc' from partially initialized module
Mongodb array operation
Unitywebrequest asynchronous Download
Set sail
天津银行周传凯:从 0 到 1,我的分布式数据库落地经验谈
DNS attack surface analysis
Maybe we can figure out the essence of the Internet after the dust falls
Stack overflow learning summary
Android Weather
408 true question - division sequence