An adaptive feature selection schema using improved technical indicators for predicting stock price movements



Download 2.42 Mb.
View original pdf
Page8/16
Date07.03.2024
Size2.42 Mb.
#63785
1   ...   4   5   6   7   8   9   10   11   ...   16
An adaptive feature selection schema using improved technical indicators
0.756
0.754
0.754 0.752
11 7
0.747 0.746 0.748 0.745 12 6
0.740 0.740 0.741 0.740 13 5
0.742 0.740 0.741 0.736 14 4
0.731 0.730 0.731 0.730 15 3
0.736 0.735 0.736 0.735 16 2
0.695 0.694 0.694 0.694 17 1
0.606 0.610 0.610 0.610
G. Ji et al.


Expert Systems With Applications 200 (2022) 116941
6
where W
f
(
a, b) is the wavelet transform coefficient,
ψ
*
a,b
is the conjugate function of the wavelet basis function. By continuously changing the scale parameter a and time center parameter b, the function W
f
(
a, b) can select the different positions of the signal and analyze the change of signal at different scales. However, this increases the complexity of calculation, which leads to the difficulty of application and implementation. Discrete wavelet transforms (DWT) is an effective substitute for CWT. The DWT discretizes the proportional scale a and time center parameter b of the CWT according to the power of two, and particularly suitable for sampling values. The DWT decomposes the signal into multiple orthogonal wavelet sets, and each set being a time series describing the coefficients of the signal in the corresponding frequency band changing with time. Suppose that after discretization a = a
j
0
,
b =
ka
j
0
b
0
,
k,j Z,
then the WT
f
(
j, k) of DWT is defined as
ψ
j,k
(
t) = a

j
2
ψ
(
a

j
t kb
0
)
(6)
WT
f
(
j, k) =

f (t)
ψ
*
j,k
(
t)dt
(7) Where the
ψ
j,k
(
t) is wavelet transform function,
ψ
*
j,k
is the conjugate function of
ψ
j,k
(
t). As shown in the above formula, the basis of DWT is the Mallat algorithm. It is a signal decomposition method, which obtains high-frequency or low-frequency signals of the sequence by scaling and contracting the proportional parameter a. Specifically, according to the unnatural decomposition level N, the input signal is decomposed into low-frequency and high-frequency signals. The low-frequency component of each layer is decomposed to get the low-frequency signal and high-frequency signal again. N scales low frequency and high-frequency component information is finally obtained until the number of decomposition layers reaches N. For stock price data, the low-frequency component reflects the overall trend of the sequence, while the high- frequency component contains random noise information. In order to realize the denoising function, the constraint or zeroing of high- frequency components can effectively eliminate noise to smooth the sequence.
4.2. Random forest
Random forest is a machine learning algorithm based on the decision tree. In the decision tree classification algorithm, the leaf nodes are split recursively until a leaf node containing only a single classification appears. Random forest is an extended variant of bagging. Its idea is to establish multiple decision trees, generate multiple training sets by bootstrap methods, and create a decision tree for each training set. Only some features are randomly selected rather than all features. Random forest is a special bagging method because it randomly samples the data set and features simultaneously. In the classification task, the final decision result is the voting result of all decision trees, while in the regression task, the final decision result is the mean of all decision tree results. Many researchers have used tree-based algorithms to predict stock prices or stock trends with success. In summary, the algorithm steps of random forest areas follows
1 Select N samples from the sample set as a training set by bootstrap.
2 Generate a decision tree with the sample set obtained by sampling. In each node generated, N features are randomly selected and not repeated, and the sample set is divided by using these N features to find the best partition feature (Gini coefficient, gain rate or information gain can be used to judge.
3 Repeat steps 1 to 2 for K times, where K is the number of decision trees in the random forest.
4 The random forest obtained from training is used to predict the test samples, and the result of prediction is determined by the voting method.
4.3. Feature importance
After training a model, in addition to being interested in the prediction results of the model, we usually want to know which features in the model are more important and which features have the greatest impacts on the forecasting. In the field of stock forecasting, higher forecasting accuracy means higher returns, and feature selection has been proven to bean effective method to improve forecasting performance. When performing stock prediction tasks, investors can choose technical indicators participating in the training according to the importance of their characteristics, delete technical indicators having a negative impact on the prediction model, and retain technical indicators having a positive impact on the prediction model. Feature importance describes the relative importance of each feature in the feature set. When training models with random forest algorithms, there are usually three ways to get feature importance scores Gini importance, permutation importance, and SHAP importance.
Gini importance is to measure the importance of the feature by calculating the amount of impurity reduction in the node through the
Gini index. The amount of impurity reduction in each feature in the random forest can be averaged, and the features are ranked accordingly. Each feature is randomly ranked based on the permutation importance, and the change of model performance is calculated. The feature that affects the performance the most is the most important one. SHAP importance is derived from the marginal benefits of individuals in cooperative games. That is, the importance of a feature is calculated by calculating the contribution of a single feature in the feature set in the model. Gini importance and SHAP importance mainly focus on solving the problem of interpretability of the model, while the permutation importance focuses more on the impact of features on the model. The purpose of this research on the importance of features is to study the impact of features on the performance of the model by selectively removing features, thereby improving the performance of the model. Therefore, permutation importance is the optimal option for describing the influence of the features on the model performance.

Download 2.42 Mb.

Share with your friends:
1   ...   4   5   6   7   8   9   10   11   ...   16




The database is protected by copyright ©ininet.org 2024
send message

    Main page