Closing Price Prediction of the Stocks Using Gradient Descent Based Linear Regression Method
摘要
The stock market is renowned for its unpredictable nature, where prices can fluctuate rapidly. Due to this uncertainty, it is crucial to be able to predict stock prices accurately. Investors, financial institutions, and regulatory bodies are all interested in stock price prediction (SPP) because it enables them to make more informed decisions. Stocks are a popular investment choice due to their potential for high returns; therefore, accurately predicting their prices is valuable. In recent years, machine learning (ML) has become an effective tool for predicting stock prices. Machine learning (ML) utilizes computer algorithms that learn from past data to make predictions about future prices. These models can identify patterns in historical data and utilize them to predict future values. One simple and commonly used machine learning method is linear regression (LR), which attempts to find the best straight line that fits the data. This study employs linear regression with a method called Gradient Descent (GD), which enables the model to find the optimal values for prediction by minimizing errors. The model utilizes data such as the stock's opening price, closing price, highest and lowest prices during the day, and trading volume. These are called feature variables. The accuracy of the model is measured using a statistic called the R-squared score, and the importance of each feature is assessed using p-values. All the work is done using Jupyter Notebook, a platform commonly used for machine learning and data analysis.