Impurity-Based Important Features for feature selection in Recursive Feature Elimination for Stock Price Forecasting: Fitur Penting Berbasis Impurity untuk pemilihan fitur dalam Recursive Feature Elimination untuk Peramalan Harga Saham - Priyatno, Arif Mudi; Sudirman, Wahyu Febri; Musridho, R. Joko; Amalia, Fazilla (LPPM Universitas Pahlawan Tuanku Tambusai, 2023)
Stock investors perform stock price forecasting based on technical indicators and historical stock prices. The large number of technical indicators and historical data often leads to overfitting and ambiguity in forecasting using machine learning. In this paper, we proposed a feature selection approach using impurity-based important features in recursive feature elimination for stock price forecasting. The data utilized includes historical data and various moving averages. Feature selection is employed to reduce the number of features and obtain important and relevant features. The recursive feature elimination with impurity-based important features is utilized as the feature selection method. The machine learning methods employed are linear regression, support vector regression, multi-layer perceptron regression, and random forest regression. The measurement results of mean squared error (mse), root mean squared error (rmse), mean absolute error (mae), and mean absolute percentage error (mape) show that the optimal feature selection and machine learning method is achieved with six features and linear regression. The average mse, rmse, mae, and mape values are 0.000279, 0.016577, 0.012843, and 1.42236%, respectively. These results validate the effectiveness of impurity-based important features for feature selection in recursive feature elimination using historical data and various moving averages in stock price forecasting.