Cybersecure XAI Algorithm for Generating Recommendations Based on Financial Fundamentals Using DeepSeek
Loading...
Official URL
Full text at PDC
Publication date
2025
Advisors (or tutors)
Editors
Journal Title
Journal ISSN
Volume Title
Publisher
MDPI
Citation
García-Magariño, I., Bravo-Agapito, J., & Lacuesta, R. (2025). Cybersecure XAI Algorithm for Generating Recommendations Based on Financial Fundamentals Using DeepSeek. AI, 6(5), 95. https://doi.org/10.3390/ai6050095
Abstract
Background: Investment decisions in stocks are one of the most complex tasks due to the uncertainty of which stocks will increase or decrease in their values. A diversified portfolio statistically reduces the risk; however, stock choice still substantially influences the profitability. Methods: This work proposes a methodology to automate investment decision recommendations with clear explanations. It utilizes generative AI, guided by prompt engineering, to interpret price predictions derived from neural networks. The methodology also includes the Artificial Intelligence Trust, Risk, and Security Management (AI TRiSM) model to provide robust security recommendations for the system. The proposed system provides long-term investment recommendations based on the financial fundamentals of companies, such as the price-to-earnings ratio (PER) and the net margin of profits over the total revenue. The proposed explainable artificial intelligence (XAI) system uses DeepSeek for describing recommendations and suggested companies, as well as several charts based on Shapley additive explanation (SHAP) values and local-interpretable model-agnostic explanations (LIMEs) for showing feature importance. Results: In the experiments, we compared the profitability of the proposed portfolios, ranging from 8 to 28 stock values, with the maximum expected price increases for 4 years in the NASDAQ-100 and S&P-500, where both bull and bear markets were, respectively, considered before and after the custom duties increases in international trade by the USA in April 2025. The proposed system achieved an average profitability of 56.62% while considering 120 different portfolio recommendations. Conclusions: A t-Student test confirmed that the difference in profitability compared to the index was statistically significant. A user study revealed that the participants agreed that the portfolio explanations were useful for trusting the system, with an average score of 6.14 in a 7-point Likert scale.
Description
This research was funded by the project “Proyecto Estratégico de Ciberseguridad Desarrollado en Zonas Escasamente Pobladas”, which was funded by the Instituto Nacional de Ciberseguridad.
This work was developed in the context of “Plan de Recuperación, Transformación y Resiliencia”, which is funded by the European Union (Next Generation). This work was also partially supported by the Spanish Ministry of Science [grant number: PID2023-149341OB-I00]. The APC was funded by the first project













