Next Article in Journal
Do the Inward and Outward Foreign Direct Investments Spur Domestic Investment in Bangladesh? A Counterfactual Analysis
Next Article in Special Issue
Three Major Crises and Asian Emerging Market Informational Efficiency: A Case of Pakistan Stock Exchange-100 Index
Previous Article in Journal
Hedonic Models of Real Estate Prices: GAM Models; Environmental and Sex-Offender-Proximity Factors
Previous Article in Special Issue
Financial Literacy Levels among Saudi Citizens across Budgeting, Saving, Investment, Debt, and Insurance Dimensions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor

by
Aistis Raudys
*,† and
Edvinas Goldstein
Institute of Informatics, Vilnius University, Didlaukio g. 47, LT-08303 Vilnius, Lithuania
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
J. Risk Financial Manag. 2022, 15(12), 602; https://doi.org/10.3390/jrfm15120602
Submission received: 14 November 2022 / Revised: 3 December 2022 / Accepted: 7 December 2022 / Published: 13 December 2022
(This article belongs to the Special Issue Financial Markets, Financial Volatility and Beyond (Volume II))

Abstract

:
It is common practice to employ returns, price differences or log returns for financial risk estimation and time series forecasting. In De Prado’s 2018 book, it was argued that by using returns we lose memory of time series. In order to verify this statement, we examined the differences between fractional differencing and logarithmic transformations and their impact on data memory. We employed LSTM (long short-term memory) recurrent neural networks and an XGBoost regressor on the data using those transformations. We forecasted risk (volatility) and price value and compared the results of all models using original, unmodified prices. From the results, models showed that, on average, a logarithmic transformation achieved better volatility predictions in terms of mean squared error and accuracy. Logarithmic transformation was the most promising transformation in terms of profitability. Our results were controversial to Marco Lopez de Prado’s suggestion, as we managed to achieve the most accurate volatility predictions in terms of mean squared error and accuracy using logarithmic transformation instead of fractional differencing. This transformation was also most promising in terms of profitability.

1. Introduction

It is common practice to make statistical measures of time series invariant over time to describe data points more precisely using traditional regression methods. Moreover, various data transformations affect how much memory or similarity will remain between modified and unmodified series. However, it is unknown how important data transformation and correlation is to the original form and how they can affect the accuracy of predictions in machine learning. In this research, we compare how well recurrent neural networks perform with and without different data transformations in terms of forecasting prices and volatility, which will be evaluated using different metrics. We will also look into the accuracy of next-day prediction, create a strategy by using different strategies and seek to maximize our profit. These metrics will be the main criteria to determine how well the recurrent neural networks can be applied in daily trading.
To understand detrending (making time series stationary), we have to understand the reasoning for that and how transformation affects time series. In general, we detrend time series to make their mean, variance, and autocorrelation constant over time or, in other words, to decompose them into parts and remove their trend and seasonality components. Removing these parts makes time series more suitable for linear regression, where linear models such as ARIMA benefit the most (more discussed by Millionis (2004)). In general, this implies that the relationship between previous data points and the following ones holds the same relationship; thus, they perform poorly on long-term forecasting because they strongly depend on previous values. On the contrary, we have recurrent neural networks, which are not dependent on a condition for linearity to be satisfied. The best example would be LSTM cells, which excel at remembering long-term dependencies, meaning that with sufficient training data, they can determine the changing fluctuations of the time series.
Like any other model, RNNs are susceptible to a sudden change in financial market behavior. If you train your model using time series when the market was under the influence of certain properties, your testing set can differ from reality if new externalities occur that drastically reshape how the market acts without any similarity in the past. This can also take some time for the model to relearn. However, if a detrended time series were used, then despite the drastic change, the model will likely have better results since it is easier to learn stationary data, or at the very least, use inverse transformation to apply previous day information to have a more accurate prediction. This is also suggested by Salles et al. (2019) in “Non-stationary time series transformation methods: An experimental review”, where the author concludes that to obtain more accurate results, time series transformations in machine learning are necessary.

2. Fractional Differencing for Stationarity and Memory

In “Advances in financial machine learning” de Prado (2018), the author justifies the loss of memory in a time series by examining the relation between non-stationary time series and its stationary transformation, specifically by comparing using first-order logarithmic and fractional differencing usually used for long memory analysis Carreno Jara (2011), Maynard et al. (2013), Sadaei et al. (2016), Baillie (1996). To fully understand this, we have to look into the fractional differentiation of order d:
X t = d X t 1 d ( d 1 ) 2 ! X t 2 + d ( d 1 ) ( d 2 ) 3 ! X t 3 + ϵ t
and rewrite it for our time series { S t } t = 1 , , T at time t with weights; then, we obtain its transformation
S t ^ = k = 0 ω k S t k
with
ω 0 = 1 and ω k = ω k 1 d k + 1 k .
Given d ( 0 , 1 ) , all weights after ω 0 = 1 will be negative and greater than 1 . When d = 0 , all weights are 0 except for ω 0 = 1 , and when d = 1 , we have a standard first-order differentiation because weights sequence { ω k } = { 1 , 1 , 0 } .
In his book de Prado (2018), de Prado provides an example of E-mini S&P log-prices, where the statistic of the Augmented Dickey–Fuller test with d = 0 (original time series) is = 0.3387 and 3.2733 with d = 0.4 , while the critical value of 5% is 2.8623 , meaning that the null hypothesis of the unit root can be rejected after fractional differentiation transformation. Furthermore, the correlation between the two datasets (original and transformed) is around 0.995 , indicating that the memory is still preserved. In comparison, a transformation with d = 1 gives an ADF statistic of 46.9114 , but correlation with the original set falls to 0.05. Thus, to achieve stationarity, it is sufficient to fractionally differentiate.
It is easy to see that weights are a recursive sequence that is decreasing and bounded. This means that is has limit L = lim k ω k , and we can show that L = lim k ω k = lim k ω k 1 d k + 1 k = L * lim k d k + 1 k ( sin ce both limits exist ) = L * 1 = L . By solving equation L = L , we obtain L = 0 . This can also be seen from Figure 1, as k increases, the weights converge to zero; in other words, the present time variable dependence on historical values decreases and memory fades.

Memory in Time Series

There are a lot of debates in the financial world about the stationary vs. memory dilemma. Some argue that these two concepts have no correlation Kom Samo (2018) as there are too many assumptions to be considered, while others oppose that opinion. Upon further reading, we tried to evaluate memory in time series before and after fractional differencing from a practitioner’s perspective.
The transformation of fractional differentiation is based on the idea that by transforming present values in relation to past values, the data series persist its trend. This implies that there is a significant connection between trends of original and transformed time series or that there is a correlation between those two sets.
In Figure 2, autocorrelations of fractionally different time series take some time to completely disappear, indicating longer memory compared to first-order difference of logarithmic time series where previous values have no significant relation to each other.
Hosking (1981) proposed that fractionally differenced processes exhibit long-term persistence and anti-persistence. One way to examine the persistence of time series is to use the Hurst exponent. The Hurst exponent H ranges between 0 and 1. If value 0 < H < 0.5 , it implies an anti-persistent series, meaning that any positive movement will likely be followed by a negative step and vice versa. If value 0.5 < H < 1 , it implies that any positive/negative change in time steps will be followed accordingly by positive/negative change. A value of H = 0.5 indicates no correlation between a series variable and its past values. Since the Hurst exponent relates to the autocorrelations lag rate changes, we can further calculate the decrease in the Hurst exponent and time series trend. An important note is that after adapting the rescaled range analysis, we calculated the average Hurst exponent of all future contracts volatility and prices being on average at around 0.602 and 0.449 , respectively, indicating that the series of volatility consists of persistence, while prices consist of anti-persistence as well as lack of long memory in time series and the rapid decay of correlations in time. In theory, cases with short memory use ARIMA models as they are more suitable compared to ARFIMA (ARIMA with a fractionally differenced lag), which is used to represent long-range time series.

3. Methodology

In this research, we used 22 future contract close prices as our data. Out of those 22 symbols, 5 were from agricultural, 5 from currency, 5 from the interest rate, 3 from metal, 2 from stock, and 2 from energy sectors. Below, we present a brief description of each of the following experiments:
  • Forecasting true range volatility with RNN;
  • Forecasting close prices with RNN and implementing results with two strategies;
  • Forecasting close prices with XGBoost regressor and implementing results with two strategies.
Each of the experiments was performed for three different time series transformations:
I.
Unmodified time series, without any manipulation, noted as d = 0;
II.
Fractional differenced time series with minimal order d to pass ADF test, noted as d = opt;
III.
Classical logarithmic transformation, noted as d = 1.
Implemented strategies We will be using two simple algorithmic trading strategies. The first strategy uses next-day predictions to determine new positions—if next-day prediction is higher (or lower) than our previous prediction, then the position will be 1 or 1 (long or short). The second strategy is more intuitive; if the prediction is higher than today’s price, we will go long, and if the prediction is lower, we will go short. Let us denote our strategy H t , S t as real price and S ^ t as predicted price, where t indicates time. When our strategies can be described as:
Strategy no . 1 : H t = 1 if S ^ t < S ^ t + 1 ; H t = 1 , if S ^ t > S ^ t + 1 ;
Strategy no . 2 : H t = 1 if S t < S ^ t + 1 ; H t = 1 , if S t > S ^ t + 1 .
The reason to implement strategy no.1 is that in some cases, RNN can manage to minimize loss efficiently despite the fact that its prediction is below or above our target. However, we can still try to see how accurate predicted positions are.

Data Transformations

In Figure 3 and Figure 4, we will show a process of detrending a few selected symbols. Before any transformation, time series were randomly distributed Figure 4, indicating non-stationarity.
After the transformation to stationary prices, we can visually see the drastic change in their distributions in Figure 5 and Figure 6.
To confirm stationarity, we applied the ADF test to check if there is a need for second-order differentiation as well as a measured correlation between the original set and transformed, see Table 1. Critical value being 2.863 at the 95% confidence level.
According to de Prado (2018), all future contracts achieve stationarity at around d < 0.6 , and most of them are stationary even at d < 0.3 . We conducted the same experiment on 22 futures contracts, and all of them proved Marcos Lopez de Prado’s statement, passing the ADF test with d < 0.6 , and a part of them achieved stationarity with d = 0.3 . Furthermore, looking into those symbols that passed the ADF test, the average correlation between original and transformed data sets with d = 0.6 is equal to 0.381 and with d = 0.3 to 0.784 , indicating that the time series with d = 0.6 might be over-differentiated, removing unnecessary information to achieve stationarity. The results of selected symbols statistics after fractional differencing are seen in Table 2.
Evaluation metrics
For prediction evaluation, we are using three metrics.
  • Profitability. We integrate predictions into the two strategies mentioned above to simulate how profitable each of them could be.
  • Accuracy. Position accuracy calculates how many times our predictions from S ^ t to S ^ t + 1 will go in the same direction as the real price movement from S t to S t + 1 .
    Accuracy = 1 n 1 t = 1 𝟙 { s g n ( S t + 1 S t ) = s g n ( S ^ t + 1 S ^ t ) } .
  • MSE. Third metric mean squared error, which calculates how far the distance is from the true values of the time series to our estimated regression
    MSE = 1 n t = 1 n ( S t S ^ t ) .
The experiment was conducted with Python using the Keras library. Because of time consumption, we grouped similarly correlated time series and predicted each group with different models. The hyperparameters for models were selected using the tryout approach. The Adam optimizer was used for all models with MSE as our loss function.
The dataset of each symbol was divided into 3 parts: training, validation, and test samples with the following ratio: 5:1:1 varying from January of 2012 until November of 2019. To deal with underfitting, we monitored each symbol’s performance by looking at the training and validation loss graph, which indicates if there is room for improvement. We also implemented early stopping to stop the model at the inflection point in validation loss to prevent overfitting.

4. Results

Forecasting risk (volatility) using True Range
Table 3 shows the tabulated results of machine learning forecasted volatility using different time series transformations. We used accuracy and MSE for measuring predictions (Figure 7).
Forecasting prices with LSTM. Strategies returns
From Table 4 below, we can see the comparison between returns with a different order of differencing using both strategies. This shows how much each data manipulation affected each symbol’s profitability. Strategies with d = 1 provide the best outcome.
Forecasting prices with LSTM. Accuracy and MSE
Table 5 illustrates the results. Note that a huge variance between MSE was caused by a different tick size of future contracts and price range (Figure 8).
Forecasting prices with XGBoost regressor: Strategy returns
XGBoost, also called Extreme Gradient Boosting, is a machine learning model that originated from Friedman et al. (2000) idea of gradient boosting used for regression and classification problems. We examined the XGBoost classifier for our datasets with window = 20. Each attempt was optimized accordingly on the validation sample. Results are depicted in Table 6.
Forecasting prices with XGBoost regressor: Accuracy and MSE
Table 7 illustrates the results. Note that a huge variance between MSE was caused by a different tick size of future contracts and price range (Figure 9).
Evaluating portfolio volatility
We can further analyze the risk of each strategy in regard to its prediction method. As Table 8 shows, both strategies show similar results in terms of volatility. As expected, the most consistent method with the difference time series is the first-order logarithmic (d = 1), providing the least amount of variance between the returns.
Assuming returns are normally distributed, we can approximate the monthly value-at-risk with a 95% confidence level (Table 9).
Neither data transformation shows a significantly lower risk. However, returns using time series transformation with d = 1 with both LSTM and XGBoost predictors are the most stable. On average, all methods indicate about at least 5–8% loss every 20 months.

5. Conclusions

According to our research, machine learning algorithms should consider stationary time series transformations as it improved their predicted values. To deal with unknown values, algorithms must have a pool of known variables to find the best fitting estimation. In most cases, first-order difference of logarithmic data transformation ( d = 1 ) showed the best results for each metric as the vast majority of symbols (more than 80%) had the best MSE value. One exception was XGBoost regressor, which was most profitable using fractional differencing as 45.45% of and 50% of all symbols earned more using two different strategies compared with other time series modifications.
Both transformations improved forecasting results in comparison with unmodified series. However, concluded results contradicted Marco López de Prado’s suggestion that saving memory in time series can lead to more accurate and profitable results compared to other methods.
For future works, we suggest further analyzing this topic since both transformations ( d = o p t and d = 1 ) improved neural network predictions compared to raw data series ( d = 0 ) . One of the possibilities is the absence of long memory in future contract prices. Determining memory impact on the order of transformation and using supplementary tests would be beneficial for future research.

Author Contributions

A.R. and E.G. authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data will be provided upon reasonable request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Baillie, Richard T. 1996. Long memory processes and fractional integration in econometrics. Journal of Econometrics 73: 5–59. [Google Scholar] [CrossRef]
  2. Carreño Jara, Emiliano. 2011. Long memory time series forecasting by using genetic programming. Genetic Programming and Evolvable Machines 12: 429–56. [Google Scholar] [CrossRef]
  3. de Prado, Marcos Lopez. 2018. Advances in Financial Machine Learning. Hoboken: John Wiley & Sons. [Google Scholar]
  4. Friedman, Jerome, Hastie Trevor, and Robert Tibshirani. 2000. Additive logistic regression: A statistical view of boosting (with discussion and a rejoinder by the authors). The Annals of Statistics 28: 337–407. [Google Scholar] [CrossRef]
  5. Hosking, J. R. M. 1981. Fractional differencing. Biometrika 68: 165–76. [Google Scholar] [CrossRef]
  6. Kom Samo, Yves-Laurent. 2018. Stationarity and Memory in Financial Markets. October 15. Available online: https://towardsdatascience.com/non-stationarity-and-memory-in-financial-markets-fcef1fe76053 (accessed on 1 November 2022).
  7. Maynard, Alex, Aaron Smallwood, and Mark E. Wohar. 2013. Long memory regressors and predictive testing: A two-stage rebalancing approach. Econometric Reviews 32: 318–60. [Google Scholar] [CrossRef]
  8. Milionis, Alexandros E. 2004. The importance of variance stationarity in economic time series modelling. A practical approach. Applied Financial Economics 14: 265–78. [Google Scholar] [CrossRef]
  9. Sadaei, HosseinJavedani, Rasul Enayatifar, Frederico Gadelha Guimarães, Maqsood Mahmud, and Zakarya A. Alzamil. 2016. Combining ARFIMA models and fuzzy time series for the forecast of long memory time series. Neurocomputing 175: 782–96. [Google Scholar] [CrossRef]
  10. Salles, Rebecca, Kele Belloze, Fabio Porto, Pedro H. Gonzalez, and Eduardo Ogasawara. 2019. Nonstationary time series transformation methods: An experimental review. Knowledge-Based Systems 164: 274–91. [Google Scholar] [CrossRef]
Figure 1. Weights distributed to different lag coefficients.
Figure 1. Weights distributed to different lag coefficients.
Jrfm 15 00602 g001
Figure 2. Autocorrelation functions of time series transformation with d = opt (upper one) and d = 1 (lower one).
Figure 2. Autocorrelation functions of time series transformation with d = opt (upper one) and d = 1 (lower one).
Jrfm 15 00602 g002
Figure 3. Non-stationary prices of selected futures during an 8 year period.
Figure 3. Non-stationary prices of selected futures during an 8 year period.
Jrfm 15 00602 g003
Figure 4. Distribution of selected non-stationary futures prices during an 8 year period.
Figure 4. Distribution of selected non-stationary futures prices during an 8 year period.
Jrfm 15 00602 g004
Figure 5. Selected futures prices after logarithmic transformation during an 8 year period.
Figure 5. Selected futures prices after logarithmic transformation during an 8 year period.
Jrfm 15 00602 g005
Figure 6. Distribution of selected futures logarithmic returns during 8 year period.
Figure 6. Distribution of selected futures logarithmic returns during 8 year period.
Jrfm 15 00602 g006
Figure 7. MSE scaled between 0 and 1.
Figure 7. MSE scaled between 0 and 1.
Jrfm 15 00602 g007
Figure 8. MSE scaled between 0 and 1.
Figure 8. MSE scaled between 0 and 1.
Jrfm 15 00602 g008
Figure 9. MSE scaled between 0 and 1.
Figure 9. MSE scaled between 0 and 1.
Jrfm 15 00602 g009
Table 1. First-order logarithmic differenced series ADF test results and correlation with original series.
Table 1. First-order logarithmic differenced series ADF test results and correlation with original series.
SymbolADF StatisticCorrelation
ES 22.480 0.001908
FESX 8.815 0.014000
FGBL 46.013 0.002109
FV 21.003 0.042371
KC 31.127 0.017448
EC 46.760 0.030828
Table 2. Statistics of fractional differenced series ADF test results and correlation with original series.
Table 2. Statistics of fractional differenced series ADF test results and correlation with original series.
SymbolADF StatisticCorrelation
ES 7.143408 0.749509
FESX 5.202948 0.182082
FGBL 7.339610 0.787414
FV 7.850287 0.724982
KC 4.875684 0.310578
EC 7.144471 0.893624
Table 3. Accuracy and MSE results of predicted true range volatility.
Table 3. Accuracy and MSE results of predicted true range volatility.
SymbolAccuracyMSE
d = 0d = optd = 1d = 0d = optd = 1
BP0.590.610.61 1.12 × 10 7 1.25 × 10 7 1.16 × 10 7
C0.430.600.51 7.21 × 10 4 1.38 × 10 2 6.09 × 10 4
SB0.560.590.59 1.89 × 10 4 5.90 × 10 5 3.66 × 10 5
SI0.510.490.48 1.44 × 10 3 3.06 × 10 4 2.32 × 10 4
ES0.690.700.70 2.20 × 10 2 2.21 × 10 2 2.82 × 10 2
SF0.570.580.58 4.14 × 10 8 3.16 × 10 8 3.64 × 10 8
ED0.650.710.65 1.79 × 10 5 6.84 × 10 3 3.96 × 10 6
RR0.560.580.62 3.37 × 10 5 6.22 × 10 5 2.40 × 10 5
PL0.590.610.72 1.96 × 10 2 6.02 × 10 3 3.04 × 10 3
BO0.580.590.70 2.10 × 10 4 1.88 × 10 4 1.21 × 10 4
FESX0.540.630.64 2.17 × 10 3 2.27 × 10 3 1.52 × 10 3
FGBS0.590.590.57 3.64 × 10 6 3.22 × 10 6 3.78 × 10 6
FV0.510.530.58 1.01 × 10 4 1.52 × 10 4 7.15 × 10 5
HG0.560.590.56 1.37 × 10 6 1.32 × 10 6 1.19 × 10 6
JY0.550.590.58 3.27 × 10 8 4.47 × 10 8 2.93 × 10 8
KC0.440.460.52 4.17 × 10 4 6.45 × 10 4 3.30 × 10 4
NE10.490.470.55 3.81 × 10 8 1.63 × 10 8 1.36 × 10 8
NG0.410.450.55 1.77 × 10 5 1.76 × 10 5 3.65 × 10 6
QM0.520.550.66 6.75 × 10 3 6.20 × 10 3 4.23 × 10 3
US0.540.550.55 4.91 × 10 3 3.19 × 10 3 1.78 × 10 3
EC0.600.590.57 5.54 × 10 8 4.33 × 10 8 2.41 × 10 8
FGBL0.520.560.51 4.05 × 10 4 4.14 × 10 4 3.65 × 10 4
Win Count:19122218
Table 4. Strategy returns using LSTM predicted prices.
Table 4. Strategy returns using LSTM predicted prices.
SymbolStrategy No. 1Strategy No. 2
d = 0 d = opt d = 1 d = 0 d = opt d = 1
BP−4.953 3.63 −4.420 2.231 −4.218−5.471
C 4.715 −6.387−10.452−14.176 0.980 −5.411
SB−9.882−10.886 0.214 −26.0498−3.776 0.356
SI 5.159 7.944 18.119 2.932 10.044 21.583
ES 11.401 7.629 2.393 0.100 −12.803−3.516
SF 3.374 1.960 1.733 4.015 2.360 1.277
ED 0.006 0.232 0.129 0.087 0.181 0.269
RR 2.221 1.118 5.719 1.663 4.774 3.331
PL9.4281.22823.7832.65419.31425.646
BO 0.071 1.412 7.898 0.125 4.540 1.245
FESX 3.3679 0.196 2.933 6.032 1.687 2.992
FGBS 0.2806 0.003 0.596 0.125 0.055 −0.547
FV 2.5998 1.128 −2.4 2.789 0.627 −3.023
HG 9.5296 8.075 7.531 6.385 7.027 0.968
JY 1.697 0.836 0.442 2.719 1.666 0.901
KC−13.3799 12.387 29.527 2.212 −15.932−26.836
NE1 3.265 3.707 1.344 0.436 3.048 2.166
NG 15.061 7.439 6.971 33.875 14.393 −1.366
QM 34.882 −28.416 10.163 25.886 −31.093 8.628
US 3.223 1.497 0.129 0.095 3.866 −1.414
EC 0.835 3.036 3.150 5.925 2.523 3.367
FGBL 0.0538 0.954 1.070 2.277 1.823 1.691
Win Count:3712778
Table 5. Accuracy and MSE results of predicted prices.
Table 5. Accuracy and MSE results of predicted prices.
SymbolAccuracyMSE
d = 0d = optd = 1d = 0d = optd = 1
BP40.8545.0745.490.0010.0000.000
C49.0950.9143.641.7718.4900.262
SB49.6354.8154.810.0410.0400.051
SI54.7951.5152.740.2590.0810.058
ES32.8837.9536.071.7911.4070.794
SF51.8054.8255.250.0000.0000.000
ED46.4649.2849.710.0210.0060.001
RR45.6159.3059.020.0350.0300.015
PL42.4753.0161.048.3073.4491.241
BO51.4749.0450.510.4540.1110.127
FESX50.0052.5055.821.8452.1220.859
FGBS45.2444.5242.920.0040.0080.001
FV42.1142.9840.800.0580.0550.049
HG46.6047.1847.570.0010.0010.001
JY46.5845.4851.230.0000.0000.000
KC48.0046.4043.014.4690.4100.406
NE149.0458.8557.230.0000.0000.000
NG56.1651.5150.000.0740.0060.005
QM49.3250.4156.771.9711.6701.377
US53.4253.0150.623.7622.0370.763
EC46.4354.3654.390.0000.0000.000
FGBL53.6254.5752.170.8160.3130.237
Win Count:66100319
Table 6. Strategy returns using LSTM predicted prices.
Table 6. Strategy returns using LSTM predicted prices.
SymbolStrategy No.1Strategy No.2
d = 0d = optd = 1d = 0d = optd = 1
BP 5.469 9.488 4.249 5.286 0.037 7.160
C 7.535 8.118 8.518 7.397 0.399 4.917
SB 9.350 −12.053 6.298 −23.960−13.049 1.238
SI 3.486 35.727 0.964 4.225 1.424 2.566
ES 18.170 4.344 −20.824 1.599 9.179 18.005
SF 0.780 4.153 4.825 0.411 1.001 1.823
ED 0.075 0.304 0.320 0.124 0.180 0.050
RR 0.848 6.093 2.142 8.471 1.610 0.878
PL 0.083 22.805 12.050 17.619 20.204 6.976
BO 1.696 17.984 0.018 9.518 −17.838 6.782
FESX 6.728 2.278 1.179 6.145 3.385 0.031
FGBS0.133 0.272 0.476 −0.155 0.281 0.939
FV 0.848 2.758 4.825 0.452 3.138 4.165
HG−26.104 9.468 −8.455 5.488 −20.174 12.823
JY 9.225 1.297 0.625 7.154 4.731 1.106
KC 0.189 1.553 −27.257−32.046−14.720 22.572
NE1 5.852 0.196 2.164 6.324 6.632 0.989
NG 0.362 12.753 14.640 0.362 6.909 5.650
QM−27.229−19.926 2.763 −25.197 2.976 4.016
US 4.804 7.022 4.351 5.313 6.336 4.927
EC 6.784 2.700 2.018 1.403 3.922 1.720
FGBL 3.429 0.046 2.164 4.727 2.015 0.780
Win Count:41084117
Table 7. Accuracy and MSE results of predicted prices.
Table 7. Accuracy and MSE results of predicted prices.
SymbolAccuracyMSE
d = 0d = optd = 1d = 0d = optd = 1
BP50.7039.4445.070.0020.0000.000
C41.8252.3542.951.4681.1430.498
SB48.1550.3754.070.3900.0310.026
SI56.1660.2746.580.1730.2110.091
ES51.2744.9443.0417.1641.4190.896
SF60.2753.5755.400.0000.0000.000
ED48.2052.5248.920.0070.0020.002
RR51.4756.1459.650.0470.0180.010
PL53.4255.7157.535.5052.4601.731
BO47.3758.8249.260.3690.1780.107
FESX44.9350.7251.3935.6231.1500.855
FGBS52.1748.2145.830.0930.0040.001
FV47.8650.2939.180.1230.1010.054
HG46.2044.6644.660.0030.0010.001
JY41.4350.6847.950.0000.0000.000
KC53.5745.0044.006.2365.7313.290
NE156.8456.8457.690.0010.0000.000
NG56.7354.0550.680.1230.0040.003
QM46.7750.3551.432.4462.7681.780
US49.7153.5749.324.0952.7841.076
EC41.5253.8049.320.0010.0000.000
FGBL41.2950.9054.4112.8682.1220.246
Win Count:7871318
Table 8. Volatility.
Table 8. Volatility.
d = 0d = optd = 1
LSTM strategy no.16.8805.7437.559
LSTM strategy no.28.4657.5487.239
XGB regressor strategy no.17.0898.8286.638
XGB regressor strategy no.27.9176.7455.451
Table 9. VaR 95%.
Table 9. VaR 95%.
d = 0d = optd = 1
LSTM strategy no.16.8805.7437.559
LSTM strategy no.28.4657.5487.239
XGB regressor strategy no.17.0898.8286.638
XGB regressor strategy no.27.9176.7455.451
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Raudys, A.; Goldstein, E. Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor. J. Risk Financial Manag. 2022, 15, 602. https://doi.org/10.3390/jrfm15120602

AMA Style

Raudys A, Goldstein E. Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor. Journal of Risk and Financial Management. 2022; 15(12):602. https://doi.org/10.3390/jrfm15120602

Chicago/Turabian Style

Raudys, Aistis, and Edvinas Goldstein. 2022. "Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor" Journal of Risk and Financial Management 15, no. 12: 602. https://doi.org/10.3390/jrfm15120602

Article Metrics

Back to TopTop