Crafting a targeted universal adversarial perturbation against the alpha model of an algorithmic trading system.
## About the Project This repository contains the code for the ECML PKDD 2021 manuscript [Taking Over the Stock Market: Adversarial Perturbations Against Algorithmic Traders](https://2021.ecmlpkdd.org/wp-content/uploads/2021/07/sub_386.pdf). Our study presents a realistic scenario in which an attacker influences algorithmic trading systems using adversarial learning techniques to manipulate the input data stream in real-time. The attacker creates a targeted universal adversarial perturbation (TUAP) that is agnostic to the target model and time of use, which remains imperceptible when added to the input stream. Our code reads and processes the data from the [S&P 500 Intraday](https://www.kaggle.com/nickdl/snp-500-intraday-data) dataset and divides it into a set for training the alpha models, a set for crafting TUAPs, and six test sets to evaluate the attack. The training set is used to train three alpha models. Then, we use the TUAP set to craft a universal adversarial perturbation that can fool the target alpha models and evaluate the perturbations' performance. Finally, we also explore various mitigation methods. Additional information is available in the paper. ## Citation ``` @article{nehemya2021taking, title={Taking Over the Stock Market: Adversarial Perturbations Against Algorithmic Traders}, author={Nehemya, Elior and Mathov, Yael and Shabtai, Asaf and Elovici, Yuval}, booktitle={ECML-PKDD}, year={2021} } ``` ## Acknowledgments The logo was created using [Lorenzo's image from Pexels](https://www.pexels.com/photo/turned-on-monitor-displaying-frequency-graph-241544/).