Skip to main content

Optimization of LSTM Algorithm Through Outliers – Application to Financial Time Series Forecasting

  • 836 Accesses

Part of the Communications in Computer and Information Science book series (CCIS,volume 1207)


The long short-term memory (LSTM) model is widely used in multiple areas, mainly for speech recognition, natural language processing and activity recognition. In the last few years, we started to see many variants of LSTM for recurrent neural networks since its inception in 1997. However, there weren’t many studies that have addressed the LSTM’s gating mechanism. In this paper, we propose a novel LSTM framework where we modify the architecture of the LSTM unit by adding a new layer that we call the “outlier gate”. The latter controls the flow of information that goes into the LSTM cell. This added signal allows us to avoid both the carry-over effect that the outliers have on the forecasted point and a bias in the estimates of our LSTM model – caused by unusual or non-repetitive events. The proposed architecture led us to an end-to-end trainable model that we applied in this paper to a financial time-series forecasting problem. Our results demonstrate that the new proposed LSTM architecture achieves better performance than the state-of-the-art original LSTM model.


This is a preview of subscription content, log in via an institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions


  1. Beard, E., et al.: Association between electronic cigarette use and changes in quit attempts, success of quit attempts, use of smoking cessation pharmacotherapy, and use of stop smoking services in England: time series analysis of population trends. BMJ 354 (2016).

  2. Gherboudj, I., Ghedira, H.: Assessment of solar energy potential over the United Arab Emirates using remote sensing and weather forecast data. Renew. Sustain. Energy Rev. 55, 1210–1224 (2016)

    Article  Google Scholar 

  3. Lahmiri, S.: A variational mode decomposition approach for analysis and forecasting of economic and financial time series. Expert Syst. Appl. 55, 268–273 (2016)

    Article  Google Scholar 

  4. Weigend, A.S.: Time Series Prediction: Forecasting the Future and Understanding the Past. Routledge, Abingdon (2018)

    Book  Google Scholar 

  5. Chatfield, C.: The Analysis of Time Series: An Introduction. CRC Press, Boca Raton (2016)

    MATH  Google Scholar 

  6. Danielsson, J., Valenzuela, M., Zer, I.: Learning from history: volatility and financial crises. Rev. Financ. Stud. 31(7), 2774–2805 (2018)

    Article  Google Scholar 

  7. Zhou, C., et al.: Application of time series analysis and PSO–SVM model in predicting the Bazimen landslide in the Three Gorges Reservoir, China. Eng. Geol. 204, 108–120 (2016)

    Article  Google Scholar 

  8. Yu, B., et al.: k-nearest neighbor model for multiple-time-step prediction of short-term traffic condition. J. Transp. Eng. 142(6), 04016018 (2016)

    Article  Google Scholar 

  9. Litjens, G., et al.: A survey on deep learning in medical image analysis. Med. Image Anal. 42, 60–88 (2017)

    Article  Google Scholar 

  10. LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proc. IEEE 86(11), 2278–2324 (1998)

    Article  Google Scholar 

  11. Bao, W., Yue, J., Rao, Y.: A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLoS ONE 12(7), e0180944 (2017)

    Article  Google Scholar 

  12. Gers, F.A., Schmidhuber, J., Cummins, F.: Learning to forget: continual prediction with LSTM. Neural Comput. 12(10), 2451–2471 (2000)

    Article  Google Scholar 

  13. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)

    Article  Google Scholar 

  14. Choi, J., Lee, B.: Combining LSTM network ensemble via adaptive weighting for improved time series forecasting. Math. Prob. Eng. 1–8 (2018).

  15. Cho, K., van Merriënboer, B., Gulcehre, C., Bougares, F., Schwenk, H., Bengio, Y.: Learning phrase representations using RNN encoder-decoder for statistical machine translation (2014).

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Houda Benkerroum .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Benkerroum, H., Cherif, W., Kissi, M. (2020). Optimization of LSTM Algorithm Through Outliers – Application to Financial Time Series Forecasting. In: Hamlich, M., Bellatreche, L., Mondal, A., Ordonez, C. (eds) Smart Applications and Data Analysis. SADASC 2020. Communications in Computer and Information Science, vol 1207. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-45182-0

  • Online ISBN: 978-3-030-45183-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics