Skip to content

Ariyamandebnath/Stock-ipy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stockipy

Stockipy is a comprehensive project designed to scrape stock data, perform exploratory data analysis (EDA), and implement multiple machine learning models to predict stock closing prices. The project includes an LSTM, GRU, and ARIMA model to compare the accuracy and losses of each. The results are presented through a multipage Streamlit application.

Table of Contents

Features

  • Data Scraping: Scrape stock data from various sources.
  • Exploratory Data Analysis (EDA): Analyze the collected data for insights and trends.
  • Machine Learning Models: Implement LSTM, GRU, and ARIMA models to predict stock closing prices.
  • Model Comparison: Compare the accuracy and losses of each model.
  • Streamlit Application: Interactive multipage Streamlit app to present data and predictions.

Video Demo

Watch the demo video below to see Stockipy in action:

Completion.mp4

Installation

  1. Clone the repository:

    git clone https://github.com/Ariyamandebnath/Stock-ipy
    cd stockipy
  2. Create and activate a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Locate to app folder:

    cd app
  2. Run the Streamlit application:

    streamlit run app.py

Project Structure

Stockipy/
β”œβ”€β”€ analysis/
β”‚ └── EDA.ipynb
β”œβ”€β”€ app/
β”‚ └── pages/
| β”‚ β”œβ”€β”€ Analysis.py
| β”‚ └── prediction.py
β”‚ β”œβ”€β”€ app.py
β”‚ └── helper.py
β”œβ”€β”€ data/
β”‚ └── temporary_Storage
β”œβ”€β”€ models/
β”‚ β”œβ”€β”€ ARIMA/
| β”‚ β”œβ”€β”€ arima.pkl
| β”‚ β”œβ”€β”€ AXIS_arima.pkl
| β”‚ β”œβ”€β”€ HDFC_arima.pkl
| β”‚ └── SBIN_arima.pkl
β”‚ β”œβ”€β”€ GRU/
| β”‚ β”œβ”€β”€ AXIS_MODEL_GRU.keras
| β”‚ β”œβ”€β”€ HDFC_MODEL_GRU.keras
| β”‚ └── SBIN_MODEL_GRU.keras
β”‚ └── LSTM/
| β”‚ β”œβ”€β”€ StockPredictionModel_AXIS.keras
| β”‚ β”œβ”€β”€ StockPredictionModel_AXIS.keras
| β”‚ └── StockPredictionModel_AXIS.keras
β”œβ”€β”€ predictions
β”‚ └── ARIMA.ipynb
β”‚ └── GRU.ipynb
β”‚ └── LSTM.ipynb
β”œβ”€β”€ scraper
β”‚ └── niftyScraper.py
β”œβ”€β”€ .gitignore
β”œβ”€β”€ requirements.txt
└── README.md

Modules

  • scraper.py: Script to scrape stock data from various sources.
  • eda.py: Script to perform exploratory data analysis on the collected data.
  • train_models.py: Script to train and evaluate LSTM, GRU, and ARIMA models.
  • app.py: Streamlit application to present data and predictions.

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md for guidelines on how to contribute to this project.

License

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

About

Real Time stock analysis the python 🐍way

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages