This project focuses on forecasting the stock prices for the next 9 months of selected companies from the Indian stock market — namely Hindustan Aeronautics Limited (HAL), Bharat Dynamics Limited (BDL), and Zen Technologies (ZENTEC). The primary goal of this project is to analyze historical stock data, perform necessary preprocessing, and apply different time series forecasting models to predict future stock prices with higher accuracy.
Data Collection & Preprocessing:
Collected historical stock price data of HAL, BDL, and ZENTEC.
Conducted exploratory data analysis (EDA) to understand stock trends and patterns using various visualizations like line plots and box plots.
Identified and handled missing values.
Detected outliers using box plots and treated them by replacing with mean values.
Split the dataset into training and testing sets in a 70:30 ratio.
ADF Test (Augmented Dickey-Fuller) — to check for stationarity.
KPSS Test — to confirm stationarity results.
ANOVA Test — to check the significance of variations across time periods.
ARIMA (Auto-Regressive Integrated Moving Average)
SARIMA (Seasonal ARIMA)
Holt-Winters Exponential Smoothing
LSTM (Long Short-Term Memory) — Deep Learning model for time series prediction
Among all the models implemented, LSTM performed the best in capturing complex patterns and long-term dependencies in stock prices, providing the most accurate predictions.
Traditional models like ARIMA and SARIMA were effective for short-term predictions, especially when the data was stationary.
Holt-Winters model worked well for seasonal data but was less effective compared to LSTM for non-linear patterns.
The forecasted stock prices for HAL, BDL, and ZENTEC for the upcoming 9 months showed an overall upward trend with minor fluctuations, aligning with historical patterns.