Abhishek-Handibag/Share_Market_Price_Prediction · 文件
文件最后提交记录最后更新时间
README.md
Share Market Price Prediction
Project Overview
This project aims to predict the closing prices of a company's stock based on historical market data using machine learning techniques. The prediction model uses a Linear Regression algorithm to forecast future prices based on features such as Open, High, Low, and Close prices from historical records.
Data Source
The data for this project comes from the CSV file containing historical stock prices for a company, including the following columns:
- Date: The date of the stock data entry
- Open: The opening price of the stock
- High: The highest price of the stock during the trading day
- Low: The lowest price of the stock during the trading day
- Close: The closing price of the stock
- Adj Close: The adjusted closing price (corrected for splits and dividends)
- Volume: The number of shares traded
Dependencies
The project requires the following libraries:
- Pandas: For data manipulation and analysis
- NumPy: For numerical computations
- Scikit-learn: For machine learning model implementation
train_test_split: For splitting the data into training and testing setsLinearRegression: For applying linear regression to the datamean_squared_error,mean_absolute_error: For evaluating model performance
- Matplotlib: For basic data visualization
- Plotly: For advanced, interactive visualizations
Installation
To install the required libraries, run the following command:
pip install pandas numpy scikit-learn matplotlib plotly
Steps
- Load the Data: The dataset is loaded from a CSV file (
3MINDIA.BO.csv), which contains historical stock data. - Data Exploration:
- Basic information about the dataset is printed using
data.info(). - Descriptive statistics are generated using
data.describe().
- Basic information about the dataset is printed using
- Data Preprocessing:
- Data is split into training and testing sets using the
train_test_splitfunction from Scikit-learn.
- Data is split into training and testing sets using the
- Model Training:
- A linear regression model is trained on the data.
- The model predicts the stock's closing prices based on historical data.
- Model Evaluation:
- The model's performance is evaluated using mean squared error and mean absolute error metrics.
- Visualization:
- Matplotlib and Plotly are used to create visualizations of the stock price trends and the model's predictions.
Usage
To run the project, ensure that you have the required dependencies installed and execute the Jupyter Notebook.