# StockFormer: A Swing Trading Strategy Based on STL Decomposition and Self-Attention Networks. (arXiv:2401.06139v1 [q-fin.TR])


Amidst ongoing market recalibration and increasing investor optimism, the U.S.
stock market is experiencing a resurgence, prompting the need for sophisticated
tools to protect and grow portfolios. Addressing this, we introduce
"Stockformer," a cutting-edge deep learning framework optimized for swing
trading, featuring the TopKDropout method for enhanced stock selection. By
integrating STL decomposition and self-attention networks, Stockformer utilizes
the S&P 500's complex data to refine stock return predictions. Our methodology
entailed segmenting data for training and validation (January 2021 to January
2023) and testing (February to June 2023). During testing, Stockformer's
predictions outperformed ten industry models, achieving superior precision in

[Read Full Article](http://arxiv.org/abs/2401.06139)

