Answers.Body: <p>Take a look at:</p>
  <p><a href="https://towardsdatascience.com/deep-reinforcement-learning-for-automated-stock-trading-f1dad0126a02" rel="nofollow noreferrer">Deep Reinforcement Learning for Automated Stock Trading</a> where the 30 Dow Jones stocks are trained using OpenAI Gym.</p>
  <p>The code is <a href="https://github.com/AI4Finance-LLC/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020" rel="nofollow noreferrer">here</a> and the published paper is  <a href="https://damoracapital.com/wp-content/uploads/2021/04/Deep-reinforcement-learning-for-Automated-Stock-trading-Ensemble-Strategy-ID3690996.pdf" rel="nofollow noreferrer">here</a>.</p>
  <p>An excerpt from the paper:</p>
  <blockquote>
  <p><em>We train a deep reinforcement learning agent and obtain an ensemble trading strategy using three actor-critic based algorithms: Proximal Policy
  Optimization (PPO), Advantage Actor Critic (A2C), and Deep Deterministic Policy Gradient (DDPG). The ensemble strategy inherits and integrates the best features of the three algorithms, thereby robustly adjusting to different market situations.</em></p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-31T19:47:45.433Z
Answers.LastActivityDate: 2021-07-31T19:52:50.723Z
Answers.LastEditDate: 2021-07-31T19:52:50.723Z
Answers.UserDisplayName: Brian O'Donnell
Body: <p>I have some plans in working with Reinforcement Learning in order to predict the stock price movement. For a stock like TSLA</p>
  <p><a href="https://i.sstatic.net/9HJmZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9HJmZ.png" alt="enter image description here" /></a></p>
  <p>some training features might be the pivot price values and the set of the difference between two consecutive pivot points.</p>
  <p>I would like that my model captures the general essence of the stock market. In other words, if I want my model to predict the stock price movement for TSLA, then my dataset will be built <em>only</em> on TSLA stock. If I try to predict the price movement on FB stock using that model, then it won't work for many reasons. So, if I want my model to predict the price movement of any stock, then I have to build a dataset using all types of stock prices.</p>
  <p>For the purpose of this question, instead of taking an example of the dataset using all the stocks, I will use only three stocks, i.e. TSLA, FB, and AMZN. So, I will generate the dataset for two years for TSLA, two years of FB, and two years of AMZN, and then pass it back to back to my model. So, in this example, I pass 6 years of data to my model for training purposes. If I start with FB, then the model will learn and memorize some patterns from the FB features. The problem is when the model is made to train on the AMZN features, it already starts to forget the information of the training on the FB dataset.</p>
  <p>Is there a way to parallelise the training on multiple stocks to avoid the memory issue?</p>
  <p>Instead of my action being a real value, it will be an action vector where the size is depending on the number of parallel stocks.</p>
  
Tags: <neural-networks><reinforcement-learning><datasets><time-series><algorithmic-trading>
Title: Is there a way to parallelise the RL training on multiple stocks to avoid the memory issue?
UserDisplayName: Alex
ThreadText: # Is there a way to parallelise the RL training on multiple stocks to avoid the memory issue?
  
  (Asked by: username_0 on 2021-07-31)
  
  I have some plans in working with Reinforcement Learning in order to predict the stock price movement. For a stock like TSLA
  
  [![enter image description here](https://i.sstatic.net/9HJmZ.png)](https://i.sstatic.net/9HJmZ.png)
  
  some training features might be the pivot price values and the set of the difference between two consecutive pivot points.
  
  I would like that my model captures the general essence of the stock market. In other words, if I want my model to predict the stock price movement for TSLA, then my dataset will be built *only* on TSLA stock. If I try to predict the price movement on FB stock using that model, then it won't work for many reasons. So, if I want my model to predict the price movement of any stock, then I have to build a dataset using all types of stock prices.
  
  For the purpose of this question, instead of taking an example of the dataset using all the stocks, I will use only three stocks, i.e. TSLA, FB, and AMZN. So, I will generate the dataset for two years for TSLA, two years of FB, and two years of AMZN, and then pass it back to back to my model. So, in this example, I pass 6 years of data to my model for training purposes. If I start with FB, then the model will learn and memorize some patterns from the FB features. The problem is when the model is made to train on the AMZN features, it already starts to forget the information of the training on the FB dataset.
  
  Is there a way to parallelise the training on multiple stocks to avoid the memory issue?
  
  Instead of my action being a real value, it will be an action vector where the size is depending on the number of parallel stocks.
  
  **Tags:** neural-networks, reinforcement-learning, datasets, time-series, algorithmic-trading
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-07-31. Score: 2
  
  Take a look at:
  
  [Deep Reinforcement Learning for Automated Stock Trading](https://towardsdatascience.com/deep-reinforcement-learning-for-automated-stock-trading-f1dad0126a02) where the 30 Dow Jones stocks are trained using OpenAI Gym.
  
  The code is [here](https://github.com/AI4Finance-LLC/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020) and the published paper is [here](https://damoracapital.com/wp-content/uploads/2021/04/Deep-reinforcement-learning-for-Automated-Stock-trading-Ensemble-Strategy-ID3690996.pdf).
  
  An excerpt from the paper:
  
  > *We train a deep reinforcement learning agent and obtain an ensemble trading strategy using three actor-critic based algorithms: Proximal Policy
  > Optimization (PPO), Advantage Actor Critic (A2C), and Deep Deterministic Policy Gradient (DDPG). The ensemble strategy inherits and integrates the best features of the three algorithms, thereby robustly adjusting to different market situations.*
  
  
  ---
  
  