title: How to use a Keras RNN model to forecast for future dates or events?
body: <p>Here is my code fore training the complete model and saving it:   </p>
  
  <pre><code>num_units = 2
  activation_function = 'sigmoid'
  optimizer = 'adam'
  loss_function = 'mean_squared_error'
  batch_size = 10
  num_epochs = 100
  
  # Initialize the RNN
  regressor = Sequential()
  
  # Adding the input layer and the LSTM layer
  regressor.add(LSTM(units = num_units, activation = activation_function, input_shape=(None, 1)))
  
  # Adding the output layer
  regressor.add(Dense(units = 1))
  
  # Compiling the RNN
  regressor.compile(optimizer = optimizer, loss = loss_function)
  
  # Using the training set to train the model
  regressor.fit(x_train, y_train, batch_size = batch_size, epochs = num_epochs)
  regressor.save('model.h5')
  </code></pre>
  
  <p>After that I have seen that most of the time people our suggesting the test dataset for checking the prediction which I have attempted as well and got good result.     </p>
  
  <p>But the problem is in the usage of the model that I have created. I want to have a forecast for next 30 days or every minute whatsoever. Now I have the trained model but I am not getting what I can do or what code do I use to use the model and forecast the prices for next 30 days or one minute.    </p>
  
  <p>Please suggest me the way out. I am stuck at this problem since a week and not able to make any successful attempts.   </p>
  
  <p>Here is the link of the repository where one can find the complete runnable code, the model, and the dataset:  <a href="https://github.com/JafferWilson/forecastbtc/" rel="nofollow noreferrer">My repository link</a></p>