This repository contains a project that predicts stock market prices using machine learning techniques and provides a web-based interface for interaction. The model is built using historical stock data and the predictions are displayed using Streamlit.
Project Importance Predicting stock market prices is a challenging and highly rewarding task in the field of finance and data science. This project demonstrates the application of machine learning algorithms to predict future stock prices based on historical data. By leveraging modern technologies and tools, this project aims to provide insights into the stock market's behavior and help users make informed decisions.
Technologies Used The project utilizes several powerful libraries and tools:
NumPy and Pandas: For efficient data manipulation and analysis.
yFinance: To fetch historical stock market data from Yahoo Finance.
Keras: For building and loading the machine learning model.
Streamlit: To create an interactive web application for users to input stock symbols and view predictions.
Matplotlib: For visualizing stock price trends and moving averages.
Data Collection: Stock market data is fetched using the yfinance library. Users can input a stock symbol, and the application retrieves historical data from Yahoo Finance.
Data Preprocessing: The data is split into training and testing sets. The last 100 days of the training set are used to ensure that the test set has the necessary previous data for prediction. The data is then scaled using MinMaxScaler to normalize the values.
Model Loading: A pre-trained Keras model (Stock Predictions Model.keras) is loaded to make predictions on the stock data.
Visualization: The application visualizes stock prices along with moving averages (50-day, 100-day, 200-day) using matplotlib. Predictions are plotted against the actual stock prices to showcase the model's performance.
User Interaction: Streamlit is used to create an interactive web interface where users can input a stock symbol, view the historical data, and see the predictions made by the model.
This stock price prediction model is developed as a part of an academic/research project and is intended for educational and informational purposes only. The predictions generated by this model are based on historical data and various machine learning algorithms. However, stock prices are influenced by a myriad of unpredictable factors including market conditions, economic events, and geopolitical developments. Use this tool at your own risk.
Contributing Contributions are welcome! Please open an issue or submit a pull request for any changes or additions.