Transformer-Based Reinforcement Learning for Forex Trading
摘要
Computer program that generates consistent profit in the Stock or Forex market is still a challenge for data scientists and scientific traders and data analysts. Forex market is predictable to some extent using trend analysis. Advances in deep reinforcement learning facilitates training of trading bots. The proposed work involves a transformer combined Deep Q-Leaning (DQN) for making trades by a trading agent and offers an alternative approach to the existing learning algorithm to improve financial trading. The trained transformer uses pre-processed input to increase the accuracy of predictions. The predictions and account information are fed into the DQN for each time step to make a buy or sell and earn a profit. Gated Recurrent Unit (GRU) relies on previous time step information, and the memory gate has retained only important information, resulting in carrying only limited information at each time step. Due to this, only short information is carried at each time step. In contrast, in a Transformer, all the time steps are processed in parallel, elimination information loss. The proposed work clearly demonstrates the predictive power of Transformers than GRU and potential of Transformers in trading bots.