Eric991005 / Stockformer

StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks
90 stars 12 forks source link

StockFormer Data File Explanation and Execution Method

Overview of "StockFormer" Code

This is the code accompanying the paper titled "StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks," which is currently under consideration for publication in the International Journal of Forecasting. The preprint of this paper is available on SSRN. The code provides a comprehensive framework for implementing the StockFormer model, including data preparation, model training, and backtesting. You can access the preprint at: SSRN Preprint.

Original Data

Due to the large size of the original data, the author has stored it on a cloud drive for readers to use. The link to the original data is as follows: raw_data

File Description

How to Run

Execute the following command in the terminal to run the model:

python Stockformer_train.py --config STOCKV4.conf

How to Cite

To cite the "StockFormer" paper and code in your research or publications, please use the following formats:

APA Style: Ma, B., Wang, Y., Lu, Y., Hu, T., Xu, J., & Houlihan, P. (Year). StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks. SSRN Electronic Journal. Advance online publication. https://doi.org/10.2139/ssrn.4648073

MLA Style: Ma, Bohan, et al. "StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks." SSRN Electronic Journal, SSRN Scholarly Paper ID 4648073, Social Science Research Network, Year, https://doi.org/10.2139/ssrn.4648073.

Chicago Style: Ma, Bohan, Wang Yiheng, Lu Yuchao, Hu Tianzixuan, Xu Jinling, and Houlihan Patrick. "StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks." SSRN Electronic Journal. Year. https://doi.org/10.2139/ssrn.4648073.

Replace "Year" with the year of publication once it becomes available. If the paper is part of a specific issue or volume, include those details as well.

Star History

Star History Chart