Unpredictability in short-term financial instrument trading is often a barrier for humans who wish to make profit. In response, day-traders utilize automated trading systems that perform high-frequency trading based on ongoing market condition analyses. Existing trading strategies have the potential to be enhanced by the capabilities of Transformers, which have proven to be capable time-series forecasters. Previous research in financial trading with Transformers often simplifies predictions to binary stock price movements or provides forecasts with low granularity. These simplifications restrict the domain of possible trading strategies, ultimately limiting the discovery of potential means of profiting. This issue is addressed by dividing the trading process into two distinct parts. First, Transformer-based models, including specialized versions like the Informer and Autoformer that excel at sequence forecasting, are trained for short-term time-series sequence forecasting based on recent prices and rates of various financial instruments with the aim of predicting their future values. Additionally, a novel loss function that assesses volatility by considering the difference in standard deviation between predictions and actual sequences is evaluated as part of this training process. Next, a trading algorithm is applied to these short-term forecasted values, determining the optimal times to buy and sell the financial instruments for profit maximization. The trading algorithm's effectiveness is evaluated daily over a six-month period using the Transformer, Informer, and Autoformer models across five financial instruments. This approach has the potential to significantly enhance the profitability of automated trading systems, paving the way for more sophisticated and effective financial trading strategies.
This work was supported by the NSF grant #CNS-2349663. Any opinions, findings, and conclusions or recommendations expressed in this work are those of the author(s) and do not necessarily reflect the views of the NSF.