AI Stock Prediction Linear Regression and Q Learning PDF
AI Stock Prediction Linear Regression and Q Learning PDF
Group Members:
Features
Closing price prediction and recommended actions
Live Demo
20 year Data Set From YFinance
Introduction to Linear Regression
Linear regression models relationships between variables. Example: Predicting stock price (y) based on Open, High, Low,
Equation: y = w1x1+ w2x2+w3x3 +w4x4+ b extended for Volume (x), establishing a clear predictive trend.
multiple variables.
3 Learning rate
Controls step size; balance between overshooting and slow
convergence.
Data Normalization: Scaling for
Accuracy
Why normalize?
Ensures variables on different
scales do not bias prediction
models.
Z-score Standardization
Centers data around mean 0 with a standard deviation of 1.
Q-Learning: Reinforcement Learning for Trading
Learns optimal trading policies by trial and error using rewards. Q-table stores expected reward values for state-action pairs,
guiding decisions.
3 Q-value update
Update based on reward and estimated future rewards with learning
and discount rates.
Combining Linear Regression & Q-Learning
Linear regression predicts short-term price based on OHLV Example: Predicted price rise triggers Q-learning to assess buy
data. decision with risk tolerance.
Future plans include adding sentiment analysis and deep learning models.