https://github.com/shriansh2002/stock-prediction
This project predicts Apple stock prices using linear regression. It's based on historical stock price data and uses Python and popular data science libraries like Pandas, NumPy, Matplotlib, and scikit-learn.
https://github.com/shriansh2002/stock-prediction
apple datascience finance linearregression machinelearning matplotlib ml numpy pandas prediction python scikitlearn stock-prediction stockmarket
Last synced: about 1 month ago
JSON representation
This project predicts Apple stock prices using linear regression. It's based on historical stock price data and uses Python and popular data science libraries like Pandas, NumPy, Matplotlib, and scikit-learn.
- Host: GitHub
- URL: https://github.com/shriansh2002/stock-prediction
- Owner: Shriansh2002
- License: mit
- Created: 2023-04-18T15:43:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-18T16:08:47.000Z (about 3 years ago)
- Last Synced: 2025-02-06T19:48:15.815Z (over 1 year ago)
- Topics: apple, datascience, finance, linearregression, machinelearning, matplotlib, ml, numpy, pandas, prediction, python, scikitlearn, stock-prediction, stockmarket
- Language: Python
- Homepage:
- Size: 206 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Stock Prediction App
This repository contains a Python script to predict the closing price of Apple stock using **Linear Regression**. The script uses data from a CSV file `AAPL.csv` to train a linear regression model and then predicts the closing price for the test data.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## Prerequisites
- Python 3.x
- Pandas
- NumPy
- Matplotlib
- Scikit-learn
## Installation
1. Clone this repository to your local machine using
```bash
git clone https://github.com/Shriansh2002/Stock-Prediction.git
```
2. Install the required packages using
```bash
pip install -r requirements.txt
```
## Usage
- Put your `AAPL.csv` file in the same directory as the script.
- Run the script using `python apple_stock_prediction.py.`
- The script will train a linear regression model on the training data and predict the - closing price for the test data.
- The root mean squared error (RMSE) of the prediction will be displayed on the console.
- A plot will also be displayed showing the predicted closing prices and the actual closing prices.
## Contributing
- Fork this repository to your own GitHub account and then clone it to your local device.
- Create a new branch:
```bash
git checkout -b my-new-feature
```
- Make changes and test them.
- Submit a pull request detailing the changes made and any additional information about the feature.
## License
This project is licensed under the MIT License - see the LICENSE.md file for details.