/Stock-Price-Analysis-and-Prediction

A notebook analysing top 4 tech stocks of NSE and making predictions using LSTM

Primary LanguageJupyter Notebook

Stock Analysis and Prediction

This repository contains code for analyzing and predicting stock prices using machine learning techniques. The project focuses on four technology stocks: TCS, INFY, HCLTECH, and WIPRO. The analysis includes visualizations of stock prices, moving averages, daily returns, correlations, and risk analysis. The prediction model is based on Long Short-Term Memory (LSTM) neural networks.

Prerequisites

To run the code in this project, you need the following dependencies:

  • pandas
  • numpy
  • matplotlib
  • seaborn
  • yfinance
  • tensorflow

You can install these dependencies using pip:

pip install pandas numpy matplotlib seaborn yfinance tensorflow

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/stock-analysis-and-prediction.git
    
  2. Open the code in your preferred Python development environment.

  3. Make sure to have the necessary libraries installed as mentioned in the prerequisites.

  4. Run the code cell by cell to analyze and predict stock prices.

Project Structure

  • main.ipynb: Jupyter Notebook containing the code for stock analysis and prediction.

Usage

The notebook provides step-by-step explanations of the analysis and prediction process. Each code cell is labeled and contains comments to guide you through the project.

You can modify the code, experiment with different stocks, or adjust the model parameters to enhance the analysis or prediction accuracy.

Results

The project generates various visualizations, including historical stock prices, moving averages, daily returns, correlations, risk analysis, and predicted prices. These visualizations help in understanding the trends and patterns in stock prices and making informed investment decisions.

Acknowledgments

  • The project utilizes the pandas, numpy, matplotlib, seaborn, yfinance, and tensorflow libraries.
  • The code and analysis provided in this project are for educational purposes and should not be considered financial advice.