Introduction: Financial markets are increasingly exposed to nonlinear dynamics, volatility clustering, and extreme-risk events that challenge traditional econometric forecasting and risk management models. This study investigates whether artificial intelligence and deep learning architectures can improve stock price forecasting, market risk measurement, and dynamic hedging performance compared with conventional benchmarks.
Methods: Daily market data from January 2015 to March 2026 were collected for AAPL, MSFT, TSLA, AMZN, and SPY, together with macroeconomic and volatility indicators. A strict chronological data split was applied, with training, validation, and out-of-sample testing periods to avoid look-ahead bias. Seven predictive models were evaluated: Random Walk, ARIMA, Random Forest, XGBoost, LSTM, GRU, and a multi-head attention Transformer. Model performance was assessed using RMSE, MAE, MAPE, and R². The best-performing model was then integrated into a market risk framework using VaR, CVaR, Kupiec backtesting, and dynamic hedging strategies.
Results: The Transformer model achieved the strongest out-of-sample forecasting performance, with RMSE = 0.72, MAE = 0.51, MAPE = 0.85%, and R² = 0.982, outperforming statistical, machine learning, and recurrent deep learning benchmarks. In market risk estimation, the AI-driven framework improved VaR and CVaR calibration and reduced exception rates compared with the traditional GARCH benchmark. The dynamic AI-based hedging strategy reduced maximum drawdown and improved the Sharpe ratio relative to the unhedged portfolio.
Conclusions: The findings suggest that attention-based AI architectures can enhance financial forecasting, tail-risk measurement, and portfolio protection. This research highlights the potential of integrating predictive analytics, risk modeling, and adaptive hedging to support more robust financial risk management decisions.