Learning volatility-adaptive forgetting via GARCH-modulated LSTM for stock price forecasting
Organizations: School of Science, University of Science and Technology Liaoning, Anshan, 114051, Liaoning, PR China
Abstract
Stock price forecasting is hindered by the heteroscedastic nature of financial time series, in which turbulent and tranquil regimes alternate. Although the Long Short-Term Memory (LSTM) network is widely used for this task, its gates are oblivious to such volatility variation, so memory retention remains fixed regardless of market conditions. A common remedy is to supply volatility estimates as an additional input feature, yet this leaves the internal memory dynamics untouched. Instead, volatility can serve as a direct regulatory signal over the gate activation itself. This paper presents the Gsigmoid-LSTM model, which embeds Generalized Autoregressive Conditional Heteroscedasticity (GARCH(1,1))-derived volatility estimates into the LSTM forgetting gate through the Gsigmoid activation function, a volatility-adaptive variant of the sigmoid that combines a volatility adjustment factor with slope regulation via a learnable parameter. The model thereby automatically prioritizes recent information during turbulent periods while preserving long-term dependencies in stable markets. In the engineering application of daily stock price forecasting, extensive experiments, including activation function comparisons, baseline evaluations, and ablation studies, demonstrate that this structural gating modification effectively improves forecasting accuracy and robustness. The proposed model significantly outperforms a feature-level fusion baseline carrying the same volatility signal on all five datasets, as confirmed by Diebold-Mariano tests with all p<0.01, attains the best average rank of 1.00 in the Friedman test across nine models, and achieves the lowest MSE and MAE on all five datasets.
Figures & tables
| Study | Integration level | Role of volatility | Learnable | Signal pathway |
| Kim and Won (2018) | Feature | GARCH-type estimates as network inputs | Input layer | |
| Kayim and Yilmaz (2022) | Activation | Standard deviation adjusts neuron response | Hidden-unit activations (not gate-specific) | |
| Amirshahi and Lahmiri (2023) | Feature | GARCH-extracted features as DL inputs | Input layer | |
| Mutinda and Langat (2024) | Decision | GARCH and AI predictions combined | Decision stage | |
| Liu (2024) | Decision | Optimal weighting across predictors | Partial | Decision stage |
| Chen (2025) | Feature | Indicators concatenated with DL inputs | Input layer |
| Activation | Formula | Range | Monotonic | Deriv. bound | Saturation |
| Sigmoid | Yes | Two-sided | |||
| Tanh | Yes | Two-sided | |||
| Swish | No | Left weak, right | |||
| ReLU | Non-strict | 0/1 | Dead zone, | ||
| Gsigmoid | Yes | By , |
| Dataset | LM Stat | LM p-value | F Stat | F p-value | Heteroskedasticity |
| JNJ | 26.67 | 2.42E-07 ∗∗∗ | 26.87 | 2.31E-07 ∗∗∗ | Yes |
| MSFT | 5.85 | 1.56E-02 ∗ | 5.86 | 1.56E-02 ∗ | Yes |
| AMZN | 4.00 | 4.56E-02 ∗ | 4.00 | 4.56E-02 ∗ | Yes |
| IXIC | 99.32 | 2.14E-23 ∗∗∗ | 102.37 | 1.02E-23 ∗∗∗ | Yes |
| GOOG | 23.31 | 1.38E-06 ∗∗∗ | 23.46 | 1.33E-06 ∗∗∗ | Yes |
| Hyperparameter | Explanation | Search Range |
| DeepESN (Deep Echo State Network) | ||
| spectral_radius | Spectral radius of reservoir weight matrix | [0.7, 0.8, 0.9, 1.0] |
| input_scaling | Scaling factor for input weights | [0.2, 0.3, 0.4, 0.5] |
| leaking_rate | Leaking rate of reservoir neurons | [0.05, 0.1, 0.15, 0.2] |
| n_layers | Number of stacked reservoir layers | [1, 2, 3] |
| n_units | Number of reservoir units per layer | [32, 64, 96, 128, 192] |
| Training Parameters | Model Architecture | Training Control | |||
| learn_rate | 0.001 | dropout | 0.3 | epochs | 80 |
| batch_size | 16 | lstm_units | 128 | patience | 15 |
| optimizer | Adam | time_step | 24 | time_step( ) | 20 |
| Dataset | Activation Function | ||||
| LSTM-Gsigmoid | LSTM-Swish | LSTM-Tanh | LSTM-ReLU | LSTM-Sigmoid | |
| JNJ | 3.26 | 3.55 | 3.66 | 3.59 | 3.59 |
| MSFT | 37.24 | 214.45 | 201.77 | 336.49 | 97.20 |
| AMZN | 12.85 | 16.63 | 17.55 | 17.51 | 45.80 |
| IXIC | 43685.02 | 214416.64 | 72794.55 | 255754.45 | 131913.75 |
| GOOG | 5.96 | 29.74 | 47.62 | 30.74 | 20.71 |
| Dataset | Activation Function | ||||
| LSTM-Gsigmoid | LSTM-Swish | LSTM-Tanh | LSTM-ReLU | LSTM-Sigmoid | |
| JNJ | 1.37 | 1.46 | 1.49 | 1.47 | 1.46 |
| MSFT | 4.64 | 12.15 | 11.60 | 15.50 | 7.93 |
| AMZN | 2.68 | 3.19 | 3.27 | 3.27 | 5.79 |
| IXIC | 162.03 | 390.75 | 224.60 | 421.61 | 303.95 |
| GOOG | 1.82 | 4.34 | 5.40 | 4.34 | 3.61 |
| Dataset | Gsigmoid-LSTM | LSTM | RNN | GRU | ANN | RVFL | DeepESN | BiLSTM | BiGRU |
| JNJ | 3.26 | 3.59 | 6.75 | 4.04 | 4.41 | 11.66 | 5.99 | 7.95 | 5.82 |
| MSFT | 37.24 | 97.20 | 583.04 | 103.09 | 50.42 | 96.99 | 91.64 | 526.19 | 105.18 |
| AMZN | 12.85 | 45.80 | 24.45 | 19.41 | 19.48 | 69.95 | 27.73 | 14.65 | 24.46 |
| IXIC | 43685.02 | 131913.75 | 454395.50 | 116705.37 | 72992.23 | 84211.76 | 101325.21 | 85080.88 | 61690.30 |
| GOOG | 5.96 | 20.71 | 66.18 | 17.82 | 7.58 | 10.57 | 14.57 | 34.25 | 29.67 |
| Dataset | Gsigmoid-LSTM | LSTM | RNN | GRU | ANN | RVFL | DeepESN | BiLSTM | BiGRU |
| JNJ | 1.37 | 1.46 | 2.16 | 1.57 | 1.66 | 2.80 | 1.97 | 2.37 | 1.95 |
| MSFT | 4.64 | 7.93 | 21.37 | 8.31 | 5.41 | 8.22 | 7.65 | 19.07 | 8.31 |
| AMZN | 2.68 | 5.79 | 4.04 | 3.55 | 3.44 | 8.36 | 4.19 | 2.91 | 4.05 |
| IXIC | 162.03 | 303.95 | 577.19 | 286.88 | 221.55 | 238.42 | 318.32 | 245.56 | 195.94 |
| GOOG | 1.82 | 3.61 | 6.78 | 3.34 | 2.12 | 2.64 | 3.08 | 4.69 | 4.38 |
| Asset | Step | MSE ( ) | MAE ( ) | R 2 ( ) | MAPE(%) ( ) |
| JNJ | 1day | 3.26 | 1.37 | 0.97 | 0.83 |
| 3days | 8.47 | 2.32 | 0.92 | 1.40 | |
| 5days | 12.79 | 2.82 | 0.88 | 1.70 | |
| 7days | 19.03 | 3.51 | 0.82 | 2.11 | |
| MSFT | 1day | 37.24 | 4.64 | 0.97 | 1.73 |
| 3days | 176.45 | 10.66 | 0.87 | 3.86 |
| Window Size | MSE ( ) | MAE ( ) | R 2 ( ) | MAPE(%) ( ) |
| 12 | 46835.32 | 172.14 | 0.9827 | 1.35 |
| 24 | 43685.02 | 162.03 | 0.9831 | 1.28 |
| 48 | 46851.14 | 166.34 | 0.9809 | 1.31 |
| 64 | 55683.83 | 185.42 | 0.9770 | 1.45 |
| 96 | 45169.04 | 163.83 | 0.9807 | 1.27 |
| Volatility Estimator | MSE ( ) | MAE ( ) | R 2 ( ) | MAPE(%) ( ) |
| GARCH(1,1) | 43685.02 | 162.03 | 0.9831 | 1.28 |
| GJR-GARCH(1,1) | 83502.94 | 240.12 | 0.9677 | 1.82 |
| EGARCH(1,1) | 181471.67 | 359.37 | 0.9299 | 2.67 |
| Dataset | Gsigmoid | Fixed- | No-Vol | Concat | LSTM |
| JNJ | 3.26 | 3.78 | 4.59 | 4.29 | 3.59 |
| MSFT | 37.24 | 81.62 | 407.61 | 248.48 | 97.20 |
| AMZN | 12.85 | 14.99 | 37.85 | 20.93 | 45.80 |
| IXIC | 43685.02 | 62084.48 | 119772.96 | 82419.70 | 131913.75 |
| GOOG | 5.96 | 20.41 | 27.22 | 20.69 | 20.71 |
| Dataset | Gsigmoid | Fixed- | No-Vol | Concat | LSTM |
| JNJ | 1.37 | 1.50 | 1.70 | 1.64 | 1.46 |
| MSFT | 4.64 | 6.95 | 17.45 | 13.23 | 7.93 |
| AMZN | 2.68 | 2.95 | 5.19 | 3.70 | 5.79 |
| IXIC | 162.03 | 200.55 | 287.86 | 240.62 | 303.95 |
| GOOG | 1.82 | 3.59 | 4.20 | 3.58 | 3.61 |
| Comparison Model | JNJ | MSFT | AMZN | IXIC | GOOG | |||||
| DM | p | DM | p | DM | p | DM | p | DM | p | |
| LSTM | -3.63 ∗∗ | 0.01 | -8.22 ∗∗ | 0.01 | -10.46 ∗∗ | 0.01 | -8.02 ∗∗ | 0.01 | -7.74 ∗∗ | 0.01 |
| RNN | -12.46 ∗∗ | 0.01 | -10.26 ∗∗ | 0.01 | -9.20 ∗∗ | 0.01 | -9.72 ∗∗ | 0.01 | -9.15 ∗∗ | 0.01 |
| GRU | -5.69 ∗∗ | 0.01 | -9.08 ∗∗ | 0.01 | -7.45 ∗∗ | 0.01 | -8.53 ∗∗ | 0.01 | -7.63 ∗∗ | 0.01 |
| ANN | -4.96 ∗∗ | 0.01 | -2.21 ∗ | 0.03 | -6.33 ∗∗ | 0.01 | -8.15 ∗∗ | 0.01 | -4.12 ∗∗ | 0.01 |
| BiLSTM | -10.65 ∗∗ | 0.01 | -8.17 ∗∗ | 0.01 | -3.74 ∗∗ | 0.01 | -7.57 ∗∗ | 0.01 | -8.30 ∗∗ | 0.01 |
| Comparison Model | JNJ | MSFT | AMZN | IXIC | GOOG | |||||
| High | Low | High | Low | High | Low | High | Low | High | Low | |
| LSTM | -2.98 ∗∗ | -2.74 ∗∗ | -5.60 ∗∗ | -6.40 ∗∗ | -4.79 ∗∗ | -14.02 ∗∗ | -3.83 ∗∗ | -8.47 ∗∗ | -4.40 ∗∗ | -6.93 ∗∗ |
| RNN | -8.70 ∗∗ | -9.56 ∗∗ | -7.36 ∗∗ | -7.59 ∗∗ | -3.73 ∗∗ | -11.47 ∗∗ | -5.50 ∗∗ | -9.82 ∗∗ | -5.69 ∗∗ | -7.81 ∗∗ |
| GRU | -4.66 ∗∗ | -4.12 ∗∗ | -6.26 ∗∗ | -6.93 ∗∗ | -1.88 ns | -10.38 ∗∗ | -4.08 ∗∗ | -9.06 ∗∗ | -4.25 ∗∗ | -6.89 ∗∗ |
| ANN | -4.49 ∗∗ | -3.15 ∗∗ | -3.30 ∗∗ | -0.24 ns | -4.82 ∗∗ | -4.86 ∗∗ | -5.87 ∗∗ | -6.52 ∗∗ | -3.45 ∗∗ | -2.28 ∗ |
| BiLSTM | -7.25 ∗∗ | -9.08 ∗∗ | -5.91 ∗∗ | -6.49 ∗∗ | -0.84 ns | -5.25 ∗∗ | -4.48 ∗∗ | -6.74 ∗∗ | -5.00 ∗∗ | -7.32 ∗∗ |
| Model | Average rank | Rank |
| Gsigmoid-LSTM | 1.00 | 1 |
| ANN | 3.00 | 2 |
| GRU | 4.80 | 3 |
| DeepESN | 5.20 | 4 |
| BiGRU | 5.40 | 5 |
| RVFL | 5.80 | 6 |
| Dataset | Metric | Comparison Model | |||
| Fixed- | No-Vol | Concat | LSTM | ||
| JNJ | DM Statistic | -6.10 | -7.38 | -6.85 | -3.63 |
| p-value | 0.01 ∗∗ | 0.01 ∗∗ | 0.01 ∗∗ | 0.01 ∗∗ | |
| MSFT | DM Statistic | -6.37 | -9.64 | -8.88 | -8.22 |
| p-value | 0.01 ∗∗ | 0.01 ∗∗ | 0.01 ∗∗ | 0.01 ∗∗ | |
| AMZN | DM Statistic | -6.30 | -9.49 | -7.64 | -10.46 |
Time Series Forecasting
Time series forecasting predicts future values from ordered observations using statistical, neural, and probabilistic models to support decisions under uncertainty.
See all 839 papers