# Smart Robotic Strategies and Advice for Stock Trading Using Deep Transformer Reinforcement Learning
## 2 Related Work
\begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Reference** & **Year** & **Data Set** & **Model** & **Application** & **Results** \\ \hline [PERSON] et al. [9] & 2011 & NASDA stock & MLP & Forecasting of stock indices. & MSE: 0.54\% \\  & & & Hybrid ANN & & \\ \hline [PERSON] et al. [10] & 2017 & National Stock Exchange & RNN & Prediction of future & MSE \\  & & & CNN & stock price & RNN: 3.90\% \\  & & & LSTM & & CNN: 2.36\% \\  & & & LSTM: 4.18\% & & LSTM: 4.18\% \\ \hline [PERSON] et al. [11] & 2019 & iShares MSCI United Kingdom & ANN, RE & Prediction of closing price of stock & RMSE ANN: 0.45 \\  & & & SVR, LSTM & price of stock & SVR 0.34 \\  & & & & RNN: 0.38 \\  & & & & LSTM: 0.30 \\ \hline [PERSON] et al. [12] & 2021 & Saudi Stock Exchange & Transformer network & Prediction of closing price of stock & Accuracy \\  & & & & & over 90\% \\ \hline [PERSON] et al. [13] & 1998 & S\&P 500 stock index & RRL & Performance check of RRL for trading and profit & Hold strategy: 0.34 \\  & & & & RRL for trading and profit & Average strategy: 0.84 \\  & & & & Voting strategy: 0.83 \\ \hline [PERSON] et al. [14] & 2018 & Dow Jones 30 stocks & DRL & Prediction of future stock price & Annualized Std. Error of 13.62\% \\  & & & & & Sharpe ratio : 1.79 \\ \hline [PERSON] et al. [15] & 2017 & Google finance & 2D-CNN & Prediction of future stock price & 70\% accuracy \\ \hline [PERSON] et al. [7] & 2017 & Dow Jones 30 stocks & Portfolio management & deep Q-learning & - \\ \hline [PERSON] et al. [16] & 2017 & Stock IF-contract & Financial Signal Representation and Trading. & DRL & 0.523 PR \\ \hline [PERSON] et al. [17] & 2019 & Stock IF-contract & AI-trader’s performance & CNN-DDPG & - \\ \hline [PERSON] et al. [18] & 2020 & 10 US equities & single-stock trading strategies & DQN & DQN outperformed Double DQN & DQN the other two techniques \\ \hline Our Work & 2022 & Saudi Stock Market(Tadawul) & 4 stocks trading strategies & Decision Transformer & An increase of around 20\% was seen in net worth \\  & & & Robo Advice & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Studies focused on the prediction of stocks using ML, DL, and DRL techniques. a Transformer neural network for predicting the closing price of Saudi stock exchange for next trading day. Their proposed method used the self-attention mechanism for learning non-linear and dynamic patterns of time-series data of stock indices. They achieved an accuracy of over 90% in accurately predicting the closing price for the next trading day. RL is an emerging area of artificial intelligence (AI) that has gained much success and acceptance in various applications, including video games, manufacturing, robotics, and aerospace. The concept of RL became prominent with the demonstrated success against human champions in board games such as chess, go, and shogi (Japanese chess). The beginning of RL can be traced back to the 1950s [4] and, since then, it has given rise to a wide variety of fascinating applications in machine control and gaming. It was not until 2013, when DeepMind researchers exhibited their application in Atari games, that it outperformed humans in the majority of games [20]; in particular, [PERSON] et al. [21] have released a paper, in 2015, demonstrating that a computer taught by Google's DeepMind team to play seven different Atari games, and defeated the best human players in three of the games. After two years, they enhanced their model, employing it to play a total of 49 different games, half of which performed beyond the human difficulty level [22]. [PERSON] et al. [13] were the first to apply RL to financial transactions, proposing a recurrent reinforcement learning (RRL) trading system in which the price is fed directly into the model as learning features for training. [PERSON] et al. [23] have established a unique price-tracking approach to choose successful judgments, by re-structuring trading as a control issue and learning trading methods based on the following of trends.