Skip to content

Real-time stock price prediction app using LSTM, Streamlit, and historical data (2010–2023). Forecasts next 10 days & visualizes trends.

Notifications You must be signed in to change notification settings

thinker84/Real-Time-stock-price-prediction-and-market-analysis-using-Machine-Learning

Repository files navigation

📈 Real-Time Stock Price Prediction and Market Analysis

Welcome to the Real-Time Stock Price Prediction and Market Analysis repository! This project focuses on predicting stock prices using advanced machine learning techniques. We utilize Long Short-Term Memory (LSTM) networks to forecast stock prices for the next 10 days, based on historical data from 2010 to 2023. The application also visualizes market trends in a user-friendly manner using Streamlit.

Download the latest release here!

Table of Contents

Features

  • Real-Time Predictions: Get stock price predictions for the next 10 days.
  • Data Visualization: View trends and historical data through interactive charts.
  • User-Friendly Interface: Built with Streamlit for an easy-to-navigate experience.
  • Comprehensive Analysis: Analyze market trends using various metrics.

Technologies Used

This project incorporates a variety of technologies to ensure robust performance:

  • Keras: For building and training the LSTM model.
  • LSTM: A type of recurrent neural network ideal for time series data.
  • Machine Learning: Techniques to analyze and predict stock prices.
  • Matplotlib: For creating static, animated, and interactive visualizations.
  • NumPy: For numerical operations on large datasets.
  • Pandas: For data manipulation and analysis.
  • Pandas-DataReader: To fetch stock data from various sources.
  • Python: The primary programming language used in this project.
  • Scikit-Learn: For additional machine learning utilities.
  • Stock Market APIs: To gather real-time data.
  • Streamlit: To create the web application interface.
  • TensorFlow: For deep learning model training.

Installation

To get started with this project, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/thinker84/Real-Time-stock-price-prediction-and-market-analysis-using-Machine-Learning.git
    cd Real-Time-stock-price-prediction-and-market-analysis-using-Machine-Learning
  2. Install Required Packages: Make sure you have Python installed. Then, install the necessary packages using pip:

    pip install -r requirements.txt
  3. Download the Latest Release: Visit the Releases section to download the latest release and execute it.

Usage

  1. Run the Application: Start the Streamlit app by executing:

    streamlit run app.py
  2. Select Stock: Use the dropdown menu to select the stock you want to analyze.

  3. View Predictions: The application will display predictions for the next 10 days along with visualizations of historical data.

How It Works

Data Collection

The application collects historical stock price data from 2010 to 2023 using Pandas-DataReader. This data includes open, high, low, and close prices.

Data Preprocessing

The data undergoes several preprocessing steps:

  • Normalization: Scale the data to improve model performance.
  • Splitting: Divide the data into training and testing sets.

Model Training

We use an LSTM model due to its effectiveness in time series forecasting. The model is trained on the historical data, learning patterns and trends.

Predictions

After training, the model can predict stock prices for the next 10 days. The predictions are displayed in the application.

Visualizations

The application features various visualizations, including:

  • Line Charts: Display stock price trends over time.
  • Bar Charts: Compare historical prices.
  • Prediction vs Actual: Visualize predicted prices against actual prices.

Contributing

We welcome contributions to improve this project. If you have suggestions or enhancements, please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Push to your branch and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or inquiries, feel free to reach out:

Thank you for checking out the Real-Time Stock Price Prediction and Market Analysis project! We hope you find it useful for your stock market analysis needs. Don't forget to check the Releases section for the latest updates!

About

Real-time stock price prediction app using LSTM, Streamlit, and historical data (2010–2023). Forecasts next 10 days & visualizes trends.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •