Forecasting Detrended Volatility Risk and Financial Price Series Using LSTM Neural Networks and XGBoost Regressor
<p>Weights distributed to different lag coefficients.</p> "> Figure 2
<p>Autocorrelation functions of time series transformation with d = opt (upper one) and d = 1 (lower one).</p> "> Figure 3
<p>Non-stationary prices of selected futures during an 8 year period.</p> "> Figure 4
<p>Distribution of selected non-stationary futures prices during an 8 year period.</p> "> Figure 5
<p>Selected futures prices after logarithmic transformation during an 8 year period.</p> "> Figure 6
<p>Distribution of selected futures logarithmic returns during 8 year period.</p> "> Figure 7
<p>MSE scaled between 0 and 1.</p> "> Figure 8
<p>MSE scaled between 0 and 1.</p> "> Figure 9
<p>MSE scaled between 0 and 1.</p> ">
Abstract
:1. Introduction
2. Fractional Differencing for Stationarity and Memory
Memory in Time Series
3. Methodology
- 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.
- 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.
Data Transformations
- 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 to will go in the same direction as the real price movement from to .
- 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
4. Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Baillie, Richard T. 1996. Long memory processes and fractional integration in econometrics. Journal of Econometrics 73: 5–59. [Google Scholar] [CrossRef]
- 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]
- de Prado, Marcos Lopez. 2018. Advances in Financial Machine Learning. Hoboken: John Wiley & Sons. [Google Scholar]
- 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]
- Hosking, J. R. M. 1981. Fractional differencing. Biometrika 68: 165–76. [Google Scholar] [CrossRef]
- 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).
- 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]
- 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]
- 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]
- 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]
Symbol | ADF Statistic | Correlation |
---|---|---|
ES | 0.001908 | |
FESX | 0.014000 | |
FGBL | 0.002109 | |
FV | 0.042371 | |
KC | 0.017448 | |
EC | 0.030828 |
Symbol | ADF Statistic | Correlation |
---|---|---|
ES | 0.749509 | |
FESX | ||
FGBL | 0.787414 | |
FV | 0.724982 | |
KC | ||
EC | 0.893624 |
Symbol | Accuracy | MSE | ||||
---|---|---|---|---|---|---|
d = 0 | d = opt | d = 1 | d = 0 | d = opt | d = 1 | |
BP | 0.59 | 0.61 | 0.61 | |||
C | 0.43 | 0.60 | 0.51 | |||
SB | 0.56 | 0.59 | 0.59 | |||
SI | 0.51 | 0.49 | 0.48 | |||
ES | 0.69 | 0.70 | 0.70 | |||
SF | 0.57 | 0.58 | 0.58 | |||
ED | 0.65 | 0.71 | 0.65 | |||
RR | 0.56 | 0.58 | 0.62 | |||
PL | 0.59 | 0.61 | 0.72 | |||
BO | 0.58 | 0.59 | 0.70 | |||
FESX | 0.54 | 0.63 | 0.64 | |||
FGBS | 0.59 | 0.59 | 0.57 | |||
FV | 0.51 | 0.53 | 0.58 | |||
HG | 0.56 | 0.59 | 0.56 | |||
JY | 0.55 | 0.59 | 0.58 | |||
KC | 0.44 | 0.46 | 0.52 | |||
NE1 | 0.49 | 0.47 | 0.55 | |||
NG | 0.41 | 0.45 | 0.55 | |||
QM | 0.52 | 0.55 | 0.66 | |||
US | 0.54 | 0.55 | 0.55 | |||
EC | 0.60 | 0.59 | 0.57 | |||
FGBL | 0.52 | 0.56 | 0.51 | |||
Win Count: | 1 | 9 | 12 | 2 | 2 | 18 |
Symbol | Strategy No. 1 | Strategy No. 2 | ||||
---|---|---|---|---|---|---|
BP | −4.953 | −4.420 | −4.218 | −5.471 | ||
C | −6.387 | −10.452 | −14.176 | −5.411 | ||
SB | −9.882 | −10.886 | −26.0498 | −3.776 | ||
SI | ||||||
ES | −12.803 | −3.516 | ||||
SF | ||||||
ED | ||||||
RR | 3.331 | |||||
PL | 9.428 | 1.228 | 23.783 | 2.654 | 19.314 | 25.646 |
BO | ||||||
FESX | ||||||
FGBS | −0.547 | |||||
FV | −2.4 | −3.023 | ||||
HG | ||||||
JY | ||||||
KC | −13.3799 | −15.932 | −26.836 | |||
NE1 | ||||||
NG | −1.366 | |||||
QM | −28.416 | −31.093 | ||||
US | −1.414 | |||||
EC | ||||||
FGBL | ||||||
Win Count: | 3 | 7 | 12 | 7 | 7 | 8 |
Symbol | Accuracy | MSE | ||||
---|---|---|---|---|---|---|
d = 0 | d = opt | d = 1 | d = 0 | d = opt | d = 1 | |
BP | 40.85 | 45.07 | 45.49 | 0.001 | 0.000 | 0.000 |
C | 49.09 | 50.91 | 43.64 | 1.771 | 8.490 | 0.262 |
SB | 49.63 | 54.81 | 54.81 | 0.041 | 0.040 | 0.051 |
SI | 54.79 | 51.51 | 52.74 | 0.259 | 0.081 | 0.058 |
ES | 32.88 | 37.95 | 36.07 | 1.791 | 1.407 | 0.794 |
SF | 51.80 | 54.82 | 55.25 | 0.000 | 0.000 | 0.000 |
ED | 46.46 | 49.28 | 49.71 | 0.021 | 0.006 | 0.001 |
RR | 45.61 | 59.30 | 59.02 | 0.035 | 0.030 | 0.015 |
PL | 42.47 | 53.01 | 61.04 | 8.307 | 3.449 | 1.241 |
BO | 51.47 | 49.04 | 50.51 | 0.454 | 0.111 | 0.127 |
FESX | 50.00 | 52.50 | 55.82 | 1.845 | 2.122 | 0.859 |
FGBS | 45.24 | 44.52 | 42.92 | 0.004 | 0.008 | 0.001 |
FV | 42.11 | 42.98 | 40.80 | 0.058 | 0.055 | 0.049 |
HG | 46.60 | 47.18 | 47.57 | 0.001 | 0.001 | 0.001 |
JY | 46.58 | 45.48 | 51.23 | 0.000 | 0.000 | 0.000 |
KC | 48.00 | 46.40 | 43.01 | 4.469 | 0.410 | 0.406 |
NE1 | 49.04 | 58.85 | 57.23 | 0.000 | 0.000 | 0.000 |
NG | 56.16 | 51.51 | 50.00 | 0.074 | 0.006 | 0.005 |
QM | 49.32 | 50.41 | 56.77 | 1.971 | 1.670 | 1.377 |
US | 53.42 | 53.01 | 50.62 | 3.762 | 2.037 | 0.763 |
EC | 46.43 | 54.36 | 54.39 | 0.000 | 0.000 | 0.000 |
FGBL | 53.62 | 54.57 | 52.17 | 0.816 | 0.313 | 0.237 |
Win Count: | 6 | 6 | 10 | 0 | 3 | 19 |
Symbol | Strategy No.1 | Strategy No.2 | ||||
---|---|---|---|---|---|---|
d = 0 | d = opt | d = 1 | d = 0 | d = opt | d = 1 | |
BP | ||||||
C | ||||||
SB | −12.053 | −23.960 | −13.049 | |||
SI | ||||||
ES | −20.824 | |||||
SF | ||||||
ED | ||||||
RR | ||||||
PL | ||||||
BO | −17.838 | |||||
FESX | ||||||
FGBS | 0.133 | −0.155 | ||||
FV | ||||||
HG | −26.104 | −8.455 | −20.174 | |||
JY | ||||||
KC | −27.257 | −32.046 | −14.720 | |||
NE1 | ||||||
NG | ||||||
QM | −27.229 | −19.926 | −25.197 | |||
US | ||||||
EC | ||||||
FGBL | ||||||
Win Count: | 4 | 10 | 8 | 4 | 11 | 7 |
Symbol | Accuracy | MSE | ||||
---|---|---|---|---|---|---|
d = 0 | d = opt | d = 1 | d = 0 | d = opt | d = 1 | |
BP | 50.70 | 39.44 | 45.07 | 0.002 | 0.000 | 0.000 |
C | 41.82 | 52.35 | 42.95 | 1.468 | 1.143 | 0.498 |
SB | 48.15 | 50.37 | 54.07 | 0.390 | 0.031 | 0.026 |
SI | 56.16 | 60.27 | 46.58 | 0.173 | 0.211 | 0.091 |
ES | 51.27 | 44.94 | 43.04 | 17.164 | 1.419 | 0.896 |
SF | 60.27 | 53.57 | 55.40 | 0.000 | 0.000 | 0.000 |
ED | 48.20 | 52.52 | 48.92 | 0.007 | 0.002 | 0.002 |
RR | 51.47 | 56.14 | 59.65 | 0.047 | 0.018 | 0.010 |
PL | 53.42 | 55.71 | 57.53 | 5.505 | 2.460 | 1.731 |
BO | 47.37 | 58.82 | 49.26 | 0.369 | 0.178 | 0.107 |
FESX | 44.93 | 50.72 | 51.39 | 35.623 | 1.150 | 0.855 |
FGBS | 52.17 | 48.21 | 45.83 | 0.093 | 0.004 | 0.001 |
FV | 47.86 | 50.29 | 39.18 | 0.123 | 0.101 | 0.054 |
HG | 46.20 | 44.66 | 44.66 | 0.003 | 0.001 | 0.001 |
JY | 41.43 | 50.68 | 47.95 | 0.000 | 0.000 | 0.000 |
KC | 53.57 | 45.00 | 44.00 | 6.236 | 5.731 | 3.290 |
NE1 | 56.84 | 56.84 | 57.69 | 0.001 | 0.000 | 0.000 |
NG | 56.73 | 54.05 | 50.68 | 0.123 | 0.004 | 0.003 |
QM | 46.77 | 50.35 | 51.43 | 2.446 | 2.768 | 1.780 |
US | 49.71 | 53.57 | 49.32 | 4.095 | 2.784 | 1.076 |
EC | 41.52 | 53.80 | 49.32 | 0.001 | 0.000 | 0.000 |
FGBL | 41.29 | 50.90 | 54.41 | 12.868 | 2.122 | 0.246 |
Win Count: | 7 | 8 | 7 | 1 | 3 | 18 |
d = 0 | d = opt | d = 1 | |
---|---|---|---|
LSTM strategy no.1 | 6.880 | 5.743 | 7.559 |
LSTM strategy no.2 | 8.465 | 7.548 | 7.239 |
XGB regressor strategy no.1 | 7.089 | 8.828 | 6.638 |
XGB regressor strategy no.2 | 7.917 | 6.745 | 5.451 |
d = 0 | d = opt | d = 1 | |
---|---|---|---|
LSTM strategy no.1 | 6.880 | 5.743 | 7.559 |
LSTM strategy no.2 | 8.465 | 7.548 | 7.239 |
XGB regressor strategy no.1 | 7.089 | 8.828 | 6.638 |
XGB regressor strategy no.2 | 7.917 | 6.745 | 5.451 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
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
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 StyleRaudys, 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