Skip to main content

Taking over the Stock Market: Adversarial Perturbations Against Algorithmic Traders

  • Conference paper
  • First Online:
Machine Learning and Knowledge Discovery in Databases. Applied Data Science Track (ECML PKDD 2021)

Abstract

In recent years, machine learning has become prevalent in numerous tasks, including algorithmic trading. Stock market traders utilize machine learning models to predict the market’s behavior and execute an investment strategy accordingly. However, machine learning models have been shown to be susceptible to input manipulations called adversarial examples. Despite this risk, the trading domain remains largely unexplored in the context of adversarial learning. In this study, we present a realistic scenario in which an attacker influences algorithmic trading systems by using adversarial learning techniques to manipulate the input data stream in real time. The attacker creates a universal adversarial perturbation that is agnostic to the target model and time of use, which remains imperceptible when added to the input stream. We evaluate our attack on a real-world market data stream and target three different trading algorithms. We show that when added to the input stream, our perturbation can fool the trading algorithms at future unseen data points, in both white-box and black-box settings. Finally, we present various mitigation methods and discuss their limitations, which stem from the algorithmic trading domain. We believe that these findings should serve as a warning to the finance community regarding the threats in this area and promote further research on the risks associated with using automated learning models in the trading domain.

E. Nehemya and Y. Mathov—Both authors contributed equally.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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

Institutional subscriptions

References

  1. Arévalo, A., Niño, J., Hernández, G., Sandoval, J.: High-frequency trading strategy based on deep neural networks. In: Huang, D.-S., Han, K., Hussain, A. (eds.) ICIC 2016. LNCS (LNAI), vol. 9773, pp. 424–436. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-42297-8_40

    Chapter  Google Scholar 

  2. Arnoldi, J.: Computer algorithms, market manipulation and the institutionalization of high frequency trading. Theory Cult. Soc. 33(1), 29–52 (2016)

    Article  Google Scholar 

  3. Athalye, A., Carlini, N., Wagner, D.: Obfuscated gradients give a false sense of security: circumventing defenses to adversarial examples. In: International Conference on Machine Learning, pp. 274–283. PMLR (2018)

    Google Scholar 

  4. Bianchi, D., Tosun, O.K.: Cyber attacks and stock market activity. SSRN (2019)

    Google Scholar 

  5. Bigiotti, A., Navarra, A.: Optimizing automated trading systems. In: Antipova, T., Rocha, A. (eds.) DSIC18 2018. AISC, vol. 850, pp. 254–261. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-02351-5_30

    Chapter  Google Scholar 

  6. Chen, G., Chen, Y., Fushimi, T.: Application of deep learning to algorithmic trading. Stanford. https://stanford.io/3dllsMC. Accessed June 2021

  7. Chong, E., Han, C., Park, F.C.: Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst. Appl. 83, 187–205 (2017)

    Article  Google Scholar 

  8. Coutts, J.A., Cheung, K.C.: Trading rules and stock returns: some preliminary short run evidence from the Hang Seng 1985–1997. Appl. Financ. Econ. 10(6), 579–586 (2000)

    Article  Google Scholar 

  9. Domm, P.: False rumor of explosion at white house causes stocks to briefly plunge. CNBC (2013). https://cnb.cx/35SVKKU. Accessed June 2021

  10. Fisher, M.: Syrian hackers claim AP hack that tipped stock market by \$136 billion. Is it terrorism? Washington Post 23 (2013)

    Google Scholar 

  11. Giacomel, F., Galante, R., Pereira, A.: An algorithmic trading agent based on a neural network ensemble: a case of study in North American and Brazilian stock markets. In: 2015 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT), vol. 2, pp. 230–233. IEEE (2015)

    Google Scholar 

  12. Goldblum, M., Schwarzschild, A., Cohen, N., Balch, T., Patel, A.B., Goldstein, T.: Adversarial attacks on machine learning systems for high-frequency trading. arXiv:2002.09565 (2020)

  13. Goodfellow, I.J., Shlens, J., Szegedy, C.: Explaining and harnessing adversarial examples. arXiv:1412.6572 (2014)

  14. Gunning, D.: Explainable artificial intelligence (XAI). Defense Advanced Research Projects Agency (DARPA), nd Web 2, 2 (2017)

    Google Scholar 

  15. Kumar, G., Jain, S., Singh, U.P.: Stock market forecasting using computational intelligence: a survey. Arch. Comput. Methods Eng. 28(3), 1069–1101 (2020). https://doi.org/10.1007/s11831-020-09413-5

    Article  MathSciNet  Google Scholar 

  16. Madry, A., Makelov, A., Schmidt, L., Tsipras, D., Vladu, A.: Towards deep learning models resistant to adversarial attacks. arXiv:1706.06083 (2017)

  17. Matt, E.: February was an insane month for the stock market. CNN (2018). https://cnn.it/3j8Q7Ah. Accessed June 2021

  18. Mitchell, C.: Erroneous trade. Investopedia (2021). https://bit.ly/2SxaU5C. Accessed June 2021

  19. Moosavi-Dezfooli, S.M., Fawzi, A., Fawzi, O., Frossard, P.: Universal adversarial perturbations. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1765–1773 (2017)

    Google Scholar 

  20. Nakashima, E.: Hack, pump and dump. The Washington Post (2007). https://wapo.st/3vSsIWs. Accessed June 2021

  21. Neyret, A.: Stock market cybercrime. Autorité des Marchés Financiers (2020). https://bit.ly/3xPE0wg. Accessed June 2021

  22. Nickdl: S&P 500 intraday data. Kaggle (2018). https://bit.ly/3gRJgJV. Accessed June 2021

  23. Pang, X., Zhou, Y., Wang, P., Lin, W., Chang, V.: An innovative neural network approach for stock market prediction. J. Supercomput. 76(3), 2098–2118 (2018). https://doi.org/10.1007/s11227-017-2228-y

    Article  Google Scholar 

  24. Rooney, K., Khorram, Y.: Hackers look to buy brokerage log-ins on the dark web with Robinhood fetching highest prices. CNBC (2020). https://cnb.cx/3zX9an1. Accessed June 2021

  25. Smith, T.: Broker. Investopedia (2020). https://bit.ly/2SVpWCC. Accessed June 2021

  26. Stacey, B.C., Bar-Yam, Y.: The stock market has grown unstable since February 2018. arXiv:1806.00529 (2018)

  27. Szegedy, C., et al.: Intriguing properties of neural networks. arXiv:1312.6199 (2013)

  28. Treleaven, P., Galas, M., Lalchand, V.: Algorithmic trading review. Commun. ACM 56(11), 76–85 (2013)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Elior Nehemya .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Nehemya, E., Mathov, Y., Shabtai, A., Elovici, Y. (2021). Taking over the Stock Market: Adversarial Perturbations Against Algorithmic Traders. In: Dong, Y., Kourtellis, N., Hammer, B., Lozano, J.A. (eds) Machine Learning and Knowledge Discovery in Databases. Applied Data Science Track. ECML PKDD 2021. Lecture Notes in Computer Science(), vol 12978. Springer, Cham. https://doi.org/10.1007/978-3-030-86514-6_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86514-6_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86513-9

  • Online ISBN: 978-3-030-86514-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics