scieee AI-readable full text Open interactive document viewer

Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values

Ergenç, Cansu,Aktaş, Rafet

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Ergenç, Cansu; Aktaş, Rafet Article Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly Provided in Cooperation with: University of Information Technology and Management, Rzeszów Suggested Citation: Ergenç, Cansu; Aktaş, Rafet (2025) : Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values, Financial Internet Quarterly, ISSN 2719-3454, Sciendo, Warsaw, Vol. 21, Iss. 1, pp. 42-66, https://doi.org/10.2478/fiqf-2025-0004 This Version is available at: https://hdl.handle.net/10419/329895 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by-nc-nd/3.0/ 10.2478/fiqf-2025-0004 Abstract This study examines the application of machine learning models to predict financial performance in various sectors, using data from 21 companies listed in the BIST100 index (2013-2023). The primary objective is to assess the potential of these models in improving financial forecast accuracy and to emphasize the need for transparent, explainable approaches in finance. A range of machine learning models, including Linear Regression, Ridge, Lasso, Decision Tree, Bagging, Random Forest, AdaBoost, Gradient Boosting (GBM), LightGBM, and XGBoost, were evaluated. Gradient Boosting emerged as the best-performing model, with ensemble methods generally demonstrating superior accuracy and stability compared to linear models. To enhance interpretability, SHAP (SHapley Additive exPlanations) values were utilized, identifying the most influential variables affecting predictions and providing insights into model behavior. Sector-based analyses further revealed differences in model performance and feature impacts, offering a granular understanding of financial dynamics across industries. The findings highlight the effectiveness of machine learning, particularly ensemble methods, in forecasting financial performance. The study underscores the importance of using explainable models in finance to build trust and support decision-making. By integrating advanced techniques with interpretability tools, this research contributes to financial technology, advancing the adoption of machine learning in datadriven investment strategies. JEL classification: C51, C52, C53 Keywords: Machine Learning Models, SHAP, Financial Forecasting Received: 31.07.2024 Accepted: 15.11.2024 Cite this: Ergenç, C. & Aktaş, R. (2025). Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values. Financial Internet Quarterly 21(1), pp. 42-66. © 2025 Cansu Ergenç and Rafet Aktaş, published by Sciendo. This work is licensed under the Creative Commons Attribution-NonCommercialNoDerivatives 3.0 License. 1 Ankara Yildirim Beyazit University, Ankara, Turkey, e-mail: [email protected], ORCID: https://orcid.org/0000-0002-4722-0911. 2 Ankara Yildirim Beyazit University, Ankara, Turkey, e-mail: [email protected], ORCID: https://orcid.org/0009-0008-8033-4604. Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 BIST100 index is an important indicator of the Turkish stock market, which includes a wide range of sectors. Therefore, it provides a very comprehensive dataset in terms of financial data estimation, where the performance of machine learning models is evaluated. This research evaluates the performance of machine learning models in financial data. This evaluation is carried out both on the general performance of companies listed in BIST100 between 2013-2023 and on a sectoral basis. As a result, both the performance of machine learning models in financial markets and their performance on a sectoral basis are examined. Our study uses SHAP (SHapley Additive Explanations) values in addition to traditional performance measures to interpret machine learning models. SHAP values increase the transparency and explainability of complex ML algorithms by providing insights into feature importance and interaction effects (Bhattacharya, 2022; Li, 2022; Baptista et al., 2022; Baptista, 2022). By examining SHAP values, this research not only evaluates the predictive accuracy of the models, but also clarifies the key factors affecting financial results. Thus, the importance of the variables in the models used for the model is also examined. The results of this study will be valuable for both academic research and realworld use and will provide important insights for investors, financial analysts, and policy makers. The rest of this paper is structured as follows. Section 2 provides a literature review of the machine learning forecasting models and factors that influence financial performance. Section 3 presents the methodology and summarizes nine machine learning models used to forecast financial performance. The results obtained are discussed in Section 4. Finally, the conclusion is presented in Section 5. In recent years, there has been considerable progress in financial forecasting using machine learning algorithms. Machine learning models are increasingly used in the financial sector to predict stock prices and classification (Sonkavde, 2023). Traditional models such as linear regression are still used (Gzar et al., 2022). Especially in predicting results based on input features, linear regression is a highly preferred model due to its simplicity and interpretability (Rosenbusch et al., 2019; Ryll ve Seidens, 2019; Seno, 2023). Machine learning models have been used in a wide range of financial domains for purposes such as credit default prediction and tourism demand forecasting, providing valuable insights for economic analysis and crisis detection, and have demonstrated the versatility and effectiveness of these algorithms in different sectors (Fan, 2023; Clavería et al., 2015; Afreen, 2020). Financial performance has always been crucial for companies, impacting nations globally. It is crucial for all countries and companies (Perrini et al., 2011; Barauskaite & Streimikiene, 2020). In recent years, the combination of finance and artificial intelligence has not just led to progress, but a transformation in financial forecasting (Lin, 2019; Nguyen et al., 2022; Avelar & Jordão, 2024). Machine learning algorithms also play a major role in this transformation. Because machine learning algorithms have provided advanced techniques that can process large amounts of data, identify patterns, and make predictions with unprecedented accuracy (Zhou et al., 2017; Mahalakshmi et al., 2022; Bouchefry & De Souza, 2020). Learning from historical data and adapting to new information, which is a feature of machine learning models, and the performance of models that improve over time are very important developments for finance (Pandey & Sergeeva, 2022; Ionescu & Diaconita, 2023; George, 2024). The place of accurate financial forecasting for financial markets is undeniable (Penman, 2002; Samonas, 2015; Kumar, 2017; Barnhizer & Barnhizer, 2019; Sastry, 2020; Massei, 2023). Investors reduce their financial risks and make informed investments by making the right investment decisions for accurate financial forecasts. Financial analysts, on the other hand, make recommendations to market participants in line with the results obtained from financial forecasts (Ramnath et al., 2008; Samonas, 2015; Magnan et al., 2015). Policy makers use financial forecasts to prevent possible financial crises and guide the current economy. Managers can benefit from these financial forecasts in their strategic decisions regarding budgeting (Ramnath et al., 2008; Oliva & Watson, 2009; Magnan et al., 2015; Ballings et al., 2015; Geng et al., 2015). With such results, machine learning models are rapidly gaining acceptance in the field of finance. When machine learning models used in financial forecasting are examined, it is seen that methods such as neural networks, decision trees and ensemble methods are used. Each method has its own advantages and disadvantages (Katal et al., 2013; Provost & Fawcett, 2013; Chen & Zhang, 2014; Najafabadi et al., 2015). The performances of these methods vary depending on the structure and size of the data used. The fact that these models give good results despite the complex structure of financial data has caused them to be preferred in areas such as credit risks, stock income, and estimating the total income of companies. In addition, the use of big data technologies has enabled the processing and analysis of large data sets, which has increased the precision and reliability of financial forecasts (Oliva & Watson, 2009; Provost & Fawcett, 2013; Chen & Zhang, 2014; Zhou et al., 2017). Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 in healthcare (Deng et al., 2022) and cervical cancer screening (Edafetanure-Ibeh, 2024), line loss prediction (Wang et al., 2017), Arctic navigation risk assessment (Yao et al., 2023), PM2.5 concentration estimation (Pan, 2018) and permeate flux prediction in osmosis processes (Shi et al., 2022). SHAP interaction values are very important for increasing the accuracy of machine learning models. They improve model interpretability by capturing local interaction effects between features, especially in models built on financial data (Orsini et al., 2022; Zern et al., 2023). In addition, SHAP interaction values ensure consistent individualized feature attribution for tree communities, providing consistent explanations for interaction effects in individual predictions (Lundberg et al., 2018; Mitchell et al., 2022). Using SHAP interaction values makes models more understandable and allows for a quantitative study of interaction effects (Long et al., 2022; Martini et al., 2022). As a result, it provides a unified approach to interpret complex model predictions and contributes to a more comprehensive understanding of model behavior (Li et al., 2020; Lundberg et al., 2020). In this section, we present the approach used to forecast the financial performance of companies listed on the BIST100 index from 2013 to 2023. The dataset consists of financial metrics such as Net Income, Total Assets, Total Liabilities, and Shareholders' Equity, which serve as the independent variables, while Total Revenue is the target variable. The data is split into a training set (80%) and a test set (20%) to ensure proper evaluation of model performance. We employ ten machine learning models: Linear Regression, Ridge Regression, Lasso Regression, Decision Tree, Bagging, Random Forest, AdaBoost, Gradient Boosting (GBM), LightGBM, and XGBoost. These models are chosen due to their varying complexity and ability to handle different types of financial data. We apply several evaluation metrics, including Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE), to assess the accuracy and robustness of the models. Each model’s predictive performance is compared against the test set to evaluate its ability to generalize. To enhance model interpretability, we use SHAP (SHapley Additive exPlanations) values, which allow us to assess the contribution of each input variable to the model’s predictions. This helps in understanding the importance of financial metrics like Net Profit, LongTerm Liabilities, and Total Assets in driving financial performance outcomes. Additionally, we ensure that all models are configured to account for the temporal naLinear regression is often complemented by other algorithms such as ridge regression, lasso regression and support vector regression to increase prediction accuracy (Xiao et al., 2020; Yoo et al., 2022). In addition, studies compare performance with models such as Random Forest, XGBoost and LSTM (Sonkavde, 2023). With the use of machine learning models in the financial sector, which model will fit the data better has become an important issue (Long et al., 2022; Akinrinola, 2024). Decision trees, which are a frequently used model among machine learning models, are preferred due to their effectiveness, interpretability and ease of visualization (Kourtellis et al., 2016; Moshkov, 1997; Azad et al., 2022; Poojitha & Kanagasabai, 2022). The structure of financial data is complex and variable, and Gradient Boosting, which has shown significant success in various practical applications due to its ability to handle complex relationships and produce accurate predictions in the use of such data, can be preferred (Natekin & Knoll, 2013; Chen, 2016; Kadiyala & Kumar, 2018; Davis et al., 2020). Along with this method, radiant Boosting algorithms such as XGBoost, LightGBM and others have become popular choices in the machine learning community due to their effectiveness in improving model performance and prediction accuracy (Mienye & Sun, 2022; Siringoringo et al., 2021; Zhang et al., 2011). LightGBM has been compared with other machine learning models such as Random Forest, XGBoost, and traditional gradient boosting in the literature, and has outperformed these models in terms of performance, speed, accuracy, and efficiency (Fraz, 2024; Grissa et al., 2020; Unal et al., 2021; Jiang, 2024). LightGBM has been successfully used in various fields, including health, environmental science, finance, and geology (Rufo et al., 2021; Su et al., 2021; Park et al., 2021; Dong et al., 2022; Ko et al., 2022; Jiang, 2024; Xiang, 2024; Wang, 2024). Furthermore, the versatility of LightGBM is evident in its applications in various fields such as fault detection in wind turbines (Tang et al., 2020), intrusion detection in IoT systems (Zhao et al., 2023), fraud detection in banking data (Hashemi et al., 2023), and malware detection (Onoja et al., 2022). Another alternative to LightGBM is the XGBoost model. The XGBoost algorithm has been shown to exhibit very high accuracy and performance on various datasets (Chen, 2016; Kareem et al., 2023). It has been successfully used in various fields including election prediction (Suacana, 2024), aircraft icing severity assessment (Li et al., 2020), surface milling accuracy (Abbas, 2023), analysis of imbalanced data (Zhang et al., 2022), and prediction and optimization tasks (Zhang, 2024). It has been used in various applications such as jaundice detection in newborns (Abdulrazzak, 2024), fault detection in photovoltaic panels (Sairam, 2020), outcome prediction Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 tential outcomes, aiding in understanding complex scenarios and making predictions based on input data (Lo et al., 2014). The prediction for a decision tree is given by: (4) where M is the number of terminal nodes, wm is the predicted value in region Rm, and I(·) is an indicator function. Bagging, short for bootstrap aggregating, is a technique that involves generating multiple versions of a predictor by resampling the training data and then aggregating these predictors to create a more robust and accurate model (Breiman, 1996; Gianola et al., 2014; Soloff et al., 2023). Bagging prediction is: (5) where B is the number of bootstrap samples and fb(x) is the prediction from the b - th bootstrap sample. Random Forest is an ensemble supervised learning algorithm known for its high accuracy in classification tasks (Ilma et al., 2023; Sandhya & Padyana, 2021; Genuer, 2012). It generates multiple decision trees by resampling the data and aggregating the predictions, resulting in a robust and accurate model. (Genuer, 2012, Strobl et al., 2008; Mishina et al., 2015; Kulkarni & Sinha, 2012). Random Forest prediction is: (6) where T is the number of trees, and ft(x) is the prediction of the $t$ - th tree. AdaBoost, short for Adaptive Boosting, is an ensemble learning method that combines multiple weak learners to create a strong classifier (Paul et al., 2009; Meir & Rätsch, 2003). It iteratively adjusts the weights of incorrectly classified instances to focus on difficult cases, improving the overall model performance (Wang et al., 2022; Yin et al., 2017; Si et al., 2022). AdaBoost prediction is: (7) where T is the number of trees, αt is the weight assigned to the $t$ - th tree based on its accuracy, and f+(x) is the prediction of the t - th tree. ture of the data, although no explicit time-series models were used. Neighboring vectors of data are considered within the framework of machine learning models to ensure that the time context is respected during training and predictions. Linear regression analysis assumes a linear relationship among multiple variables (Schroeder et al., 2016). The general Linear Regression model can be stated by the equation below: (1) where, yi dependent variable, xi explanatory variables, β0 constant term, βk slope coefficients for each explanatory variable, Ɛi the model's error term. Ridge regression is an extension of linear regression, known for its bias-variance trade-off control that provides a balance between model complexity and generalization performance, is a valuable technique used to address multicollinearity in datasets where independent variables are highly correlated (Malthouse, 1999; Kibria & Saleh, 2004; Khalaf, 2012; Kumar et al., 2021). By adding a penalty term to the OLS method, ridge regression helps to stabilize the predictions and prevent overfitting, making it a more reliable and consistent method for modeling relationships between variables (Xin & Khalid, 2018; Wei & Diğerleri, 2020; Li, 2024). Ridge regression minimizes the following cost function: (2) where λ is the regularization parameter. Lasso regression is a widely used technique in regression analysis known for its ability to perform variable selection and regularization (Rajaratnam et al., 2015; Signorino & Kirchner, 2018; Friedman et al., 2010). Lasso regression minimizes the following cost function: (3) where λ is the regularization parameter. A decision tree is a decision support tool that uses a tree-like graph to represent decisions and their po0 1 1 2 2 ... i i i k ki i y X X X      = + + + + + 22 0 1 1 1 () pp n i j ij j i j j argmin y x      = = =  = − − +      2 0 1 1 1 () pp n i j ij j i j j argmin y x      = = =  = − − +      1 ( ) ( ) M mm m f x w I x R = =  1 1 ( ) ( ) B b b f x f x B= = 1 1 ( ) ( ) T b t f x f x T= = 1 ( ) ( ) T tt t f x f x  = = Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 (11) (12) (13) (14) (15) SHapley Additive exPlanations (SHAP) values are a method rooted in cooperative game theory that aims to provide a fair allocation of importance values to features in machine learning models (Uddin et al., 2022). This approach has been utilized in various studies to enhance the interpretability and transparency of machine learning models across different domains. For instance, SHAP values have been employed to interpret the outputs of support vector machines, random forests, convolutional neural networks, and long shortterm memory models in forecasting climatic water balance (Uddin et al., 2022). Additionally, SHAP has been used to interpret models in predicting sepsis in-hospital mortality (Zhang, 2024), automating data center operations (Gebreyesus, 2024), and developing prognostic models for critically ill patients (Fan et al., 2023). The application of SHAP values extends to diverse areas such as predicting tropical cyclogenesis (Loi, 2024), evaluating hospital mobility (Santamato, 2024), predicting gout associated with dietary factors (Cao, 2024), and optimizing photodegradation rate predictions (Schossler, 2023). By leveraging SHAP values, researchers have gained deeper insights into model predictions, feature importance, and the specific contributions of variables to the outcomes of machine learning models (Cao, 2024). Furthermore, SHAP values have been instrumental in enhancing the interpretability, explainability, and fairness of machine learning models (Hickey et al., 2020). For a model and input features , the SHAP value for a feature is given by: (16) Gradient Boosting is a powerful ensemble machine learning technique that iteratively builds a series of weak learners, typically decision trees, to create a strong predictive model. By focusing on the errors of the previous models during training, Gradient Boosting aims to improve prediction accuracy by minimizing the overall loss function (Zhang et al., 2011; Mayr & Schmid, 2014; Johnson & Zhang, 2014). Gradient Boosting prediction is: (8) where T is the number of trees, v is the learning rate, and ft(x) is the t - th tree trained to predict the residuals of the previous trees. LightGBM, short for Light Gradient Boosting Machine, is an extremely efficient algorithm designed for gradient-boosting decision trees (Jiang, 2024). LightGBM prediction is: (9) where T is the number of trees, and ft(x) is the prediction of the t - th tree using the Light GBM framework, which employs gradient-based one-side sampling and exclusive feature bundling. XGBoost, short for Extreme Gradient Boosting, is a powerful machine learning algorithm renowned for its scalability, speed, and accuracy (Chen, 2016). XGBoost prediction is: (10) where T is the number of trees, and ft(x) is the prediction of the t - th tree using the XGBoost algorithm. which optimizes for a reqularized obiective to prevent overfitting. The evaluation of these models was conducted using several key performance metrics: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and relative Root Mean Squared Error (rRMSE). The evaluation of the machine learning models in this study is based on several key performance metrics that quantify the accuracy and robustness of the predictions. The metrics used are as follows: 1 ( ) ( ) T t t f x vf x = = 1 ( ) ( ) T t t f x f x = = 1 ( ) ( ) T t t f x f x = = 2 1() ii MSE Y Y n =−  2 1() ii RMSE Y Y n =−  1 i MAE Y Y n =−  1 100/ % nii ii yy MAPE ny = − = 2 1 1() n i i i yy n rRMSE y =− = !( 1)![ ( {}) ( )] !s s s s SN S N S i f x i f x N   −− =  −  Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 In this article, we investigate the impact of variables affecting financial performance on total revenue. The data consists of 21 companies listed in BIST100 for a 10-year period (2013-2023). Figure 1 shows the sectoral distribution of companies. Where, N is the set of all features, S is any subset of N that does not include feature I, fs(xs U {i}) is the prediction of the model when feature i is included in subset S, fs(xs) is the prediction of the model when feature i is not included. Figure 1: Sectoral Distribution of Companies Source: Author’s own work. our study, Net Income, Total Assets, Total Liabilities, and Shareholders’ Equity, Short-term Liabilities, Longterm Liabilities were treated as independent features, while Total Revenue served as the output or target feature. Figure 2 shows the ROA for each company from 2013 to 2023. This study is separated into training (80%) and testing (20%) datasets to compare the performance of various machine learning models. The dataset is randomly split, with 80% used as the training dataset and the remaining 20% as the testing set. This approach is commonly used in prior studies (Abellán & Mantas, 2014; Antunes et al., 2017; Ben Jabeur et al., 2020). In Figure 2: ROA for each company from 2013 to 2023 Source: Author’s own work. Automotive and Automotive SubIndustry Energy Food and Beverages Holding and Investments Steel Retail Telecommunications Cement and Construction Materials Chemicals and Smart Materials Home Appliances and Electronics Iron Retail Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 (MAPE), and relative Root Mean Squared Error (rRMSE). Table 1 summarizes the performance metrics for each model. Appendix 1 shows the performance of machine learning models over the test sample. The performance of various machine learning models was evaluated using five key metrics: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error Table 1: MSE, RMSE, MAE, MAPE and rRMSE values Model MSE RMSE MAE MAPE rRMSE Linear regression 0.0040 0.0635 0.0430 41.22% 0.736 Ridge regression 0.0040 0.0635 0.0430 41.22% 0.736 Lasso Regression 0.0040 0.0635 0.0430 41.22% 0.736 Decision Trees 0.0046 0.0676 0.0456 118.58% 0.783 Bagging 0.0016 0.0399 0.0239 4.19% 0.462 Random Forests 0.0016 0.0403 0.0246 4.55% 0.466 Adaboost 0.0018 0.0428 0.0269 2.83% 0.496 GBM 0.0014 0.0378 0.0235 13.92% 0.438 LightGBM 0.0044 0.0695 0.0719 69.84% 0.777 XGBoost 0.0046 0.0679 0.0616 73.54% 0.786 Source: Author’s own work. tion accuracy by focusing on misclassified instances. AdaBoost's iterative approach to adjusting the weights of misclassified instances contributes to its enhanced performance and reliability. Gradient Boosting (GBM) outperforms most models with the lowest MSE of 0.0014 and RMSE of 0.0378. The model's MAE and MAPE values indicate high accuracy and precision in predictions, making it a robust choice for financial forecasting. GBM's ability to iteratively improve upon errors made by previous models results in superior predictive capabilities and robustness. Also, LightGBM, known for its efficiency, shows higher error metrics compared to other boosting methods. This could be due to the model's sensitivity to the dataset characteristics or the hyperparameter settings used in this study. Its MAPE of 69.84% indicates considerable prediction errors in certain instances, suggesting that further tuning and adjustment may be needed to optimize its performance for this specific dataset. Similarly, XGBoost, another popular boosting algorithm, performs akin to Decision Trees, with an MSE of 0.0046 and an RMSE of 0.0679. However, it shows a relatively high MAPE of 73.54%, indicating that it may not be the best fit for this specific dataset without further tuning. The higher error metrics suggest that XGBoost's default settings might not be fully optimized for the financial forecasting task at hand. The variation in MAPE across these models can be attributed to their respective abilities to capture complex relationships in the financial data. Simpler models like Linear Regression, Ridge, and Lasso struggle with these intricacies, leading to higher error rates. On the contrary, ensemble methods like Bagging, Random Forests, and Gradient Boosting tend to mitigate overfitting and handle complex data relaThe linear models, including Linear Regression, Ridge Regression, and Lasso Regression, exhibit identical performance metrics. These models are characterized by their simplicity and baseline nature, which is reflected in the relatively high values of MSE, RMSE, MAE, and rRMSE. The MAPE for these models is notably large at 41.22%, indicating that they may struggle to capture the complex relationships within the financial data effectively. This limitation suggests that while these models are straightforward to interpret, they are not well-suited for accurately predicting financial performance in this context. The Decision Tree model shows a higher MSE and RMSE compared to the linear models, with an exceptionally high MAPE of 118.58%. This high MAPE suggests that the Decision Tree model tends to overfit the data, making it less reliable for prediction despite its interpretability. The overfitting is likely due to the model's tendency to capture noise and fluctuations in the training data, leading to poor generalization to new data. On the other hand, ensemble methods such as Bagging and Random Forests demonstrate significantly better performance than the individual Decision Tree model. These models exhibit lower MSE, RMSE, and MAE values, with Bagging showing a slightly better performance than Random Forests. The MAPE values for Bagging and Random Forests are impressively low at 4.19% and 4.55%, respectively, indicating strong predictive accuracy and stability. These results highlight the effectiveness of ensemble methods in reducing variance and improving the robustness of predictions. AdaBoost performs well, with an MSE of 0.0018 and an RMSE of 0.0428. The model shows a remarkably low MAPE of 2.83%, underscoring its ability to handle complex data and improve overall predic- Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 stand how each model performed within specific industries. Table 2 presents the Mean Squared Error (MSE) values for each sector and model combination. Figure 4 shows Comparison of MSE Values Across Different Sectors and Models. tionships more effectively, resulting in lower MAPE and better predictive performance. The performance of the machine learning models was further analyzed across different sectors to underTable 2: MSE values for sector Sectors Linear regression Ridge Lasso DT Bagging MSE Food and Beverage 0.00266 0.00266 0.00266 0.00148 0.00022 Cement and Construction Materials 0.00203 0.00203 0.00203 0.00197 0.00121 Chemistry and Smart Materials 0.00307 0.00307 0.00307 0.00061 0.00024 Energy 0.00423 0.00423 0.00423 0.00127 0.00035 Home Appliances and Electronics 0.00102 0.00102 0.00102 0.00000 0.00004 Automotive and Automotive Sub-Industry 0.00805 0.00805 0.00805 0.00073 0.00070 Holding and Investment 0.00137 0.00137 0.00137 0.00062 0.00055 Iron-Steel 0.00172 0.00172 0.00172 0.00034 0.00046 Retail 0.00861 0.00861 0.00861 0.00045 0.00012 Telecommunications 0.00231 0.00231 0.00231 0.00063 0.00044 Sectors RF Adaboost GBM LightGBM XGBoost MSE Food and Beverage 0.00021 0.00004 0.00017 0.00455 0.00266 Cement and Construction Materials 0.00125 0.00154 0.00133 0.00355 0.00203 Chemistry and Smart Materials 0.00027 0.00019 0.00008 0.00357 0.00307 Energy 0.00033 0.00031 0.00015 0.00658 0.00423 Home Appliances and Electronics 0.00004 0.00002 0.00006 0.00500 0.00102 Automotive and Automotive Sub-Industry 0.00070 0.00030 0.00040 0.00438 0.00805 Holding and Investment 0.00058 0.00054 0.00026 0.00576 0.00137 Iron-Steel 0.00046 0.00002 0.00015 0.00451 0.00172 Retail 0.00012 0.00009 0.00012 0.00710 0.00861 Telecommunications 0.00050 0.00069 0.00046 0.00320 0.00231 Source: Author’s own work. best performance in this sector with MSE values of 0.00008 and 0.00024, respectively. These results highlight the effectiveness of these ensemble methods in capturing the complexity of data in the chemistry and smart materials sector. In the energy sector, GBM stands out with an MSE of 0.00015, followed by Bagging with an MSE of 0.00035. These models demonstrate superior predictive accuracy, suggesting they are well-suited for forecasting financial performance in the energy industry. The Bagging model performs exceptionally well in this sector, achieving the lowest MSE of 0.00022. Random Forest follows closely with an MSE of 0.00021, indicating strong predictive performance. AdaBoost also performs well with an MSE of 0.00004, suggesting high accuracy in this sector. Bagging and Random Forests show better performance in this sector compared to other models, with MSE values of 0.00121 and 0.00125, respectively. GBM also performs well with an MSE of 0.00133, indicating good predictive capabilities in this industry. GBM and Bagging models exhibit the Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Moshkov, M. (1997). Algorithms for constructing of decision trees. In: Principles of Data Mining and Knowledge Discovery: First European Symposium (pp. 335-342). Springer, Berlin. Najafabadi, M.M., Villanustre, F., Khoshgoftaar, T.M., Seliya, N., Wald, R. & Muharemagic, E. (2015). Deep learning applications and challenges in big data analytics. Journal of Big Data, 2(1), 1-21. Natekin, A. & Knoll, A. (2013). Gradient boosting machines, a tutorial. Frontiers in Neurorobotics, 7, 21. Nguyen, D.K., Sermpinis, G. & Stasinakis, C. (2023). Big data, artificial intelligence and machine learning: A transformative symbiosis in favor of financial technology. European Financial Management, 29(2), 517-548. Oliva, R. & Watson, N. (2009). Managing functional biases in organizational forecasts: A case study of consensus forecasting in supply chain planning. Production and Operations Management, 18(2), 138-151. Onoja, M., Jegede, A., Blamah, N., Abimbola, O.V. & Omotehinwa, T.O. (2022). EEMDS: Efficient and effective malware detection system with hybrid model based on XceptionCNN and LightGBM algorithm. Journal of Computing and Social Informatics, 1(2), 42-57, https://doi.org/10.33736/jcsi.4739.2022. Orsini, N., Moore, A. & Wolk, A. (2022). Interaction analysis based on Shapley values and extreme gradient boosting: A realistic simulation and application to a large epidemiological prospective study. Frontiers in Nutrition, 9, 1-8. Pan, B. (2018, February). Application of XGBoost algorithm in hourly PM2.5 concentration prediction. In: IOP Conference Series: Earth and Environmental Science (Vol. 113, p. 012127). IOP Publishing, Bristol. Pandey, M.K. & Sergeeva, I. (2022). Artificial intelligence impact evaluation: Transforming paradigms in financial institutions. Mir Èkonomiki I Upravleniâ, 22(1), 147-164, https://doi.org/10.25205/2542-0429-2022-22-1-147-164. Park, S., Son, S., Bae, J., Lee, D., Kim, J.J. & Kim, J. (2021). Robust spatiotemporal estimation of PM concentrations using boosting-based ensemble models. Sustainability, 13(24), 1-15. Paul, B., Athithan, G. & Murty, M.N. (2009). Speeding up AdaBoost classifier with random projection. In: 2009 Seventh International Conference on Advances in Pattern Recognition (pp. 251-254), IEEE, New Jersey. Penman, S. H. (2002). The quality of financial statements: Perspectives from the recent stock market bubble. Papers SSRN 319262, 1-44, http://dx.doi.org/10.2139/ssrn.319262. Permana, S., Rosadi, R. & Nikki, N. (2022). Application of classification algorithm for sales prediction. TEKNOKOM, 5(2), 119-124, https://doi.org/10.31943/teknokom.v5i2.77. Perrini, F., Russo, A., Tencati, A. & Vurro, C. (2011). Deconstructing the relationship between corporate social and financial performance. Journal of Business Ethics, 102, 59-76, https://doi.org/10.1007/s10551-011-1194-1. Poojithaa, M. & Malathib, K. (2022). Decision tree over support vector machine for better accuracy in identifying the problem based on the Iris flower. Advances in Parallel Computing Algorithms, Tools and Paradigms, 41, 209-217. Prasad, A. & Bakhshi, P. (2022). Forecasting the direction of daily changes in the India VIX index using machine learning. Journal of Risk and Financial Management, 15(12), 1-16, https://doi.org/10.3390/jrfm15120552. Provost, F. & Fawcett, T. (2013). Data science and its relationship to big data and data-driven decision making. Big Data, 1(1), 51-59, https://doi.org/10.1089/big.2013.1508. Rajaratnam, B., Roberts, S., Sparks, D. & Dalal, O. (2015). Lasso regression: Estimation and shrinkage via the limit of Gibbs sampling. Journal of the Royal Statistical Society: Series B Statistical Methodology, 78(1), 153-174. Ramnath, S., Rock, S. & Shane, P. (2008). The financial analyst forecasting literature: A taxonomy with suggestions for further research. International Journal of Forecasting, 24(1), 34-75. Rohatgi, S., Singh, K.K. & Jasuja, D. (2021). Comparative analysis of machine learning algorithm to forecast Indian stock market. In 2021 International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE) (pp. 278-283). IEEE, New Jersey, https://doi.org/10.1109/ICACITE51222.2021.9404642. Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Rosenbusch, H., Soldner, F., Evans, A.M. & Zeelenberg, M. (2021). Supervised machine learning methods in psychology: A practical introduction with annotated R code. Social and Personality Psychology Compass, 15(2), 1-25. Rufo, D., Debelee, T., Ibenthal, A. & Negera, W. (2021). Diagnosis of diabetes mellitus using gradient boosting machine (LightGBM). Diagnostics, 11(9), 1-14, https://doi.org/10.3390/diagnostics11091714 Ryll, L. & Seidens, S. (2019). Evaluating the performance of machine learning algorithms in financial market forecasting: A comprehensive survey, arXiv preprint, 1906, https://doi.org/10.48550/arXiv.1906.07786. Sairam, S., Srinivasan, S., Marafioti, G., Subathra, B., Mathisen, G. & Bekiroglu, K. (2020). Explainable Incipient Fault Detection Systems for Photovoltaic Panels. arXiv preprint, 2011, https://doi.org/10.48550/arXiv.2011.09843. Samonas, M. (2015). Financial forecasting, analysis, and modelling: A framework for long-term forecasting. John Wiley & Sons, Hoboken. Sandhya, V. & Padyana, A. (2021). Machine learning based crop yield prediction on geographical and climatic data. In: 2021 Sixth International Conference on Image Information Processing (ICIIP) (pp. 186-191). IEEE, New Jersey. Sastry, V.V.L.N. (2020). Artificial intelligence in financial services and banking industry. Idea Publishing, London. Shi, F., Lu, S., Gu, J., Lin, J., Zhao, C., You, X. & Lin, X. (2022). Modeling and evaluation of the permeate flux in forward osmosis process with machine learning. Industrial & Engineering Chemistry Research, 61(49), 18045-18056. Si, Z., Niu, H. & Wang, W. (2022). Credit Risk Assessment by a Comparison Application of Two Boosting Algorithms. In: Fuzzy Systems and Data Mining VIII (pp. 34-40). IOS Press, Amsterdam. Signorino, C. & Kirchner, A. (2018). Using lasso to model interactions and nonlinearities in survey data. Survey Practice, 11(1), 1-10, https://doi.org/10.29115/SP-2018-0005. Siringoringo, R., Perangin, R. & Jamaluddin, J. (2021). Model hibrid genetic-XGBoost dan principal component analysis pada segmentasi dan peramalan pasar. Methomika Jurnal Manajemen Informatika Dan Komputerisasi Akuntansi, 5(2), 97-103, https://doi.org/10.46880/jmika.Vol5No2.pp97-103. Soloff, J. A., Barber, R.F. & Willett, R. (2024). Bagging provides assumption-free stability. Journal of Machine Learning Research, 25(131), 1-35. Sonkavde, G. (2023). Forecasting stock market prices using machine learning and deep learning models: A systematic review, performance analysis and discussion of implications. International Journal of Financial Studies, 11(3), 1-22, https://doi.org/10.3390/ijfs11030094. Strobl, C., Boulesteix, A., Kneib, T., Augustin, T. & Zeileis, A. (2008). Conditional variable importance for random forests. BMC Bioinformatics, 9(1), 1-11. Su, H., Lu, X., Chen, Z., Zhang, H., Lu, W. & Wu, W. (2021). Estimating coastal chlorophyll-a concentration from timeseries OLCI data based on machine learning. Remote Sensing, 13(4), 1-21. Suacana, I. (2024). Optimizing the 2024 governor election quick count with extreme gradient boosting (XGBoost) to increase voting prediction accuracy. International Journal of Software Engineering and Computer Science, 4(1), 91-106, https://doi.org/10.35870/ijsecs.v4i1.2286. Tang, M., Zhao, Q., Ding, S., Wu, H., Li, L., Wen, L. & Huang, B. (2020). An improved LightGBM algorithm for online fault detection of wind turbine gearboxes. Energies, 13(4), 807-823. Uddin, M.N., Li, L.Z., Deng, B.Y. & Ye, J. (2023). Interpretable XGBoost–SHAP machine learning technique to predict the compressive strength of environment-friendly rice husk ash concrete. Innovative Infrastructure Solutions, 8(5), 147-168, https://doi.org/10.1007/s41062-023-01122-9. Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Ünal, A. F., Kaleli, A. Y., Ummak, E. & Albayrak, Ö. (2021, August). A Comparison of State-of-the-Art Machine Learning Algorithms on Fault Indication and Remaining Useful Life Determination by Telemetry Data. In: 8th International Conference on Future Internet of Things and Cloud (pp. 79-85). IEEE, New Jersey. Wang, L., Kern, R., Yu, E., Choi, S. & Pan, J. (2023). IntelliSleepScorer, a software package with a graphic user interface for automated sleep stage scoring in mice based on a light gradient boosting machine algorithm. Scientific Reports, 13(1), 1-11, https://doi.org/10.1038/s41598-023-31288-2. Wang, M. (2024). Identification of mine water source based on TPE-LightGBM. Scientific Reports, 14(1), 1-11. Wang, P., Xie, M., Wang, X., Yu, J., Chen, E., Zhou, Z., Niu, Y., Song, W., Ni, Q. & Zhu, J. (2022). Comparison of nomogram with machine learning techniques for prediction of overall survival in patients with retroperitoneal liposarcoma, Research Square, 1, 1-20. Wang, S., Pengfei, D. & Tian, Y. (2017). A novel method of statistical line loss estimation for distribution feeders based on feeder cluster and modified XGBoost. Energies, 10(12), 1-17. Wei, C. (2024). Comparison of different machine learning classification models for predicting deep vein thrombosis in lower extremity fractures. Scientific Reports, 14(1), 1-8. Wei, L., Zhang, Y., Wang, Z., Zhao, L., Zhang, Y., Lu, X. & Cao, L. (2020). Hyperspectral inversion of soil organic matter content based on a combined spectral index model. Sensors, 20(10), 1-17. Wu, Z., Lei, T., Shen, C., Wang, Z., Cao, D. & Hou, T. (2019). ADMET evaluation in drug discovery. 19. Reliable prediction of human cytochrome P450 inhibition using artificial intelligence approaches. Journal of Chemical Information and Modeling, 59(11), 4587-4601, https://doi.org/10.1021/acs.jcim.9b00801. Xiang, Y. (2024). Enhancing non-invasive colorectal cancer screening with stool DNA methylation markers and LightGBM machine learning, Research Square, 1, 1-19, https://doi.org/10.21203/rs.3.rs-3857174/v1. Xiao, D., Chen, J., Zhang, K. & Qian, H. (2020). Privacy-preserving locally weighted linear regression over encrypted millions of data. IEEE Access, 8, 2247-2257, https://doi.org/10.1109/ACCESS.2019.2962700. Xin, S. & Khalid, K. (2018). Modelling house price using ridge regression and lasso regression. International Journal of Engineering & Technology, 7(4), 498-501. Yao, S., Wu, Q., Kang, Q., Chen, Y. & Yi, L. (2023). An interpretable XGBoost-based approach for Arctic navigation risk assessment. Risk Analysis, 44(2), 459-476, https://doi.org/10.1111/risa.14175. Yin, S., Ouyang, P., Xu, D., Liu, L. & Wei, S. (2017). An AdaBoost-based face detection system using parallel configurable architecture with optimized computation. IEEE Systems Journal, 11(1), 260-271. Yoo, H., Lee, K., Woo, J., Park, S., Lee, S., Joo, J., Bae, J.-S., Hwong, H.-J. & Park, B. (2022). A genome-wide association study and machine-learning algorithm analysis on the prediction of facial phenotypes by genotypes in Korean women. Clinical, Cosmetic and Investigational Dermatology, 15, 433-445. Zern, A., Broelemann, K. & Kasneci, G. (2023). Interventional SHAP values and interaction values for piecewise linear regression trees. Proceedings of the AAAI Conference on Artificial Intelligence, 37(9), 11164-11173. Zhan, C., Zheng, Y., Zhang, H. & Wen, Q. (2021). Random-Forest-Bagging Broad Learning System with applications for COVID-19 pandemic. IEEE Internet of Things Journal, 8, 15906-15918. Zhang, B., Sethy, A., Sainath, T.N. & Ramabhadran, B. (2011). Application specific loss minimization using gradient boosting. In: IEEE International Conference on Acoustics, Speech and Signal Processing (pp. 4880-4883). IEEE, New Jersey, https://doi.org/10.1109/ICASSP.2011.5947449. Zhang, J. (2024). Optimization and application of XGBoost logging prediction model for porosity and permeability based on k-means method. Applied Sciences, 14(10), 1-18, https://doi.org/10.3390/app14103956. Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Zhang, J. (2024). Prediction of compressive strength of geopolymer concrete landscape design: Application of the novel hybrid RF-GWO-XGBoost algorithm. Buildings, 14(3), 1-32, https://doi.org/10.3390/buildings14030591. Zhang, J., Mucs, D., Norinder, U. & Svensson, F. (2019). LightGBM: An effective and scalable algorithm for prediction of chemical toxicity-application to the Tox21 and mutagenicity data sets. Journal of Chemical Information and Modeling, 59(10), 4150-4158, https://doi.org/10.1021/acs.jcim.9b00633. Zhang, P., Jia, Y. & Shang, Y. (2022). Research and application of XGBoost in imbalanced data. International Journal of Distributed Sensor Networks, 18(6), 1-10, https://doi.org/10.1177/15501329221106935. Zhao, G., Wang, Y. & Wang, J. (2023). Intrusion detection model of Internet of Things based on LightGBM. IEICE Transactions on Communications, 106(8), 622-634, https://doi.org/10.1587/transcom.2022EBP3169. Zhou, L., Pan, S., Wang, J. & Vasilakos, A.V. (2017). Machine learning on big data: Opportunities and challenges. Neurocomputing, 237, 350-361, https://doi.org/10.1016/j.neucom.2017.01.026. Appendix 1: Performances of machine learning models over test sample Actual vs. Predicted Total Income (Linear Regression) Actual vs. Predicted Total Income (Ridge Regression) Actual vs. Predicted Total Income (Lasso Regression) Actual vs. Predicted Total Income (Decision Tree) Actual vs. Predicted Total Income (Bagging) Actual vs. Predicted Total Income (AdaBoost) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Source: Author’s own work. Actual vs. Predicted Total Income (Gradient Boosting) Actual vs. Predicted Total Income (XGBoost) Actual vs. Predicted Total Income (Random Forest) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Appendix 2: SHAP feature importance and summary of the financial forecasting results for the selected machine learning models (a) Linear Regression (b) Ridge Regression Feature Value Feature Value High Low SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 (c) Lasso Regression (d) Decision Tree Feature Value Feature Value Low High Low High SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 (e) Bagging (g) AdaBoost Feature Value Feature Value SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 (f) Random Forest (h) Gradient Boosting Feature Value Feature Value SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) Cansu Ergenç, Rafet Aktaş Sector-specific financial forecasting with machine learning algorithm and SHAP interaction values Financial Internet Quarterly 2025, vol. 21 / no. 1 Source: Author’s own work. (i) LightGBM (j) XGBoost Feature Value Feature Value SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output) SHAP Value (impact on the model’s output) Mean (|SHAP Values|) (average impact (magnitude) of each feature on the model’s output)