Answers.Body: <p>I tend to like GRU and its variants for this type of problem. Although, if your dataset isn't too large you can test some toy models(smaller versions) of the different types to know which will achieve the best accuracy.</p>
  <p>Typically a good size to start with in that case would be about 20-25% of your full model size.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-10T06:07:15.873Z
Answers.LastActivityDate: 2022-08-10T06:07:15.873Z
Answers.UserDisplayName: hisairnessag3
Body: <p>I have a dataset with features (f) for different stocks (S) and want to infer for price using an LSTM model. Here is my df:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>year</th>
  <th>S1_price</th>
  <th>S1_f1</th>
  <th>S1_f2</th>
  <th>S2_price</th>
  <th>S2_f1</th>
  <th>S2_f2</th>
  <th>Sn_price</th>
  <th>Sn_f1</th>
  <th>Sn_f2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2010</td>
  <td>100</td>
  <td>0.1</td>
  <td>0.12</td>
  <td>200</td>
  <td>0.2</td>
  <td>0.22</td>
  <td>300</td>
  <td>0.3</td>
  <td>0.32</td>
  </tr>
  <tr>
  <td>2011</td>
  <td>105</td>
  <td>0.4</td>
  <td>0.42</td>
  <td>205</td>
  <td>0.5</td>
  <td>0.52</td>
  <td>305</td>
  <td>0.6</td>
  <td>0.62</td>
  </tr>
  <tr>
  <td>2012</td>
  <td>110</td>
  <td>0.7</td>
  <td>0.72</td>
  <td>210</td>
  <td>0.8</td>
  <td>0.82</td>
  <td>310</td>
  <td>0.9</td>
  <td>0.92</td>
  </tr>
  <tr>
  <td>n</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and so on... (example values).</p>
  <p>I would like to predict the prices of every stock by using the features as inputs looking 1yr back into the past.</p>
  <p>Example for Stock 1 (predict 2012):</p>
  <pre><code>[[0.1 0.12]
   [0.4 0.42]] 110
  </code></pre>
  <p>However, I want to to that for all stocks, so I am not sure which type of LSTM to use.</p>
  <p>Your help would be very much appreciated!</p>
  
Tags: <long-short-term-memory>
Title: Choice of LSTM for price prediction
UserDisplayName: Sphenoidale
ThreadText: # Choice of LSTM for price prediction
  
  (Asked by: username_0 on 2022-08-08)
  
  I have a dataset with features (f) for different stocks (S) and want to infer for price using an LSTM model. Here is my df:
  
  
  
  
  year
  S1_price
  S1_f1
  S1_f2
  S2_price
  S2_f1
  S2_f2
  Sn_price
  Sn_f1
  Sn_f2
  
  
  
  
  2010
  100
  0.1
  0.12
  200
  0.2
  0.22
  300
  0.3
  0.32
  
  
  2011
  105
  0.4
  0.42
  205
  0.5
  0.52
  305
  0.6
  0.62
  
  
  2012
  110
  0.7
  0.72
  210
  0.8
  0.82
  310
  0.9
  0.92
  
  
  n
  
  
  
  
  
  
  
  
  
  
  
  
  
  and so on... (example values).
  I would like to predict the prices of every stock by using the features as inputs looking 1yr back into the past.
  Example for Stock 1 (predict 2012):
  [[0.1 0.12]
   [0.4 0.42]] 110
  
  However, I want to to that for all stocks, so I am not sure which type of LSTM to use.
  Your help would be very much appreciated!
  
  **Tags:** long-short-term-memory
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-08-10. Score: 0
  
  I tend to like GRU and its variants for this type of problem. Although, if your dataset isn't too large you can test some toy models(smaller versions) of the different types to know which will achieve the best accuracy.
  
  Typically a good size to start with in that case would be about 20-25% of your full model size.
  
  
  ---
  
  