Comments (2)
So you need to consider the nature of the LSTM as it will give you an output for next day. This will help you validate your signals.
To test the model output for tomorrow, you would need to feed the model with the most recent data point and use it to make a prediction. Here is an example of how to do this in Python (there should be a prediction example in my solution)
# import necessary libraries
import pandas as pd
from keras.models import load_model
# load the saved model
model = load_model('model.h5')
# load the most recent data point
data = pd.read_csv('data.csv')
latest_data = data.tail(1)
# preprocess the data (normalize, standardize, etc.)
# ...
# create the input tensor
# ...
# make the prediction
prediction = model.predict(input_tensor)
# print the predicted value
print('Tomorrow\'s stock price prediction:', prediction)
In the code above, you would first load the saved model using the load_model() function from the Keras library. Then, you would load the most recent data point and preprocess it as needed to create the input tensor. Finally, you would use the predict() method of the model to make a prediction for tomorrow's stock price, and print the result to the console.
from stock-prediction-deep-neural-learning.
Thank you. I guess I have to normalize/standardize the same way as you have in your trained model before the prediction.
from stock-prediction-deep-neural-learning.
Related Issues (16)
- Help in running code HOT 3
- Actual/Prediction ok. But what about results? HOT 3
- KeyError: 'shortName' HOT 1
- I also did this project 3 years ago. I have a question for your project HOT 3
- How to forecast the next nth price HOT 1
- What's the difference between Simulated and Predicted, thx.
- Prediction graph is wrong
- Am I looking at it wrong or is the "prediction" simply a time delayed noisy copy of the input sequence? HOT 1
- pydot import error? all the required packages are installed however
- hello HOT 13
- Hello, what I want to ask is how you successfully run run_ prediction_ Forecasting.py。
- something about yfinance and stock prediction HOT 1
- Herramienta complementaria HOT 8
- How can we use this to predict future dates (outside training/validation)? HOT 2
- Why does each run of inference produce different results? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stock-prediction-deep-neural-learning.