https://github.com/nneji123/stock-price-predictor-web-app-with-flask
A simple web app to predict stock prices(USD) made with Flask(python).
https://github.com/nneji123/stock-price-predictor-web-app-with-flask
Last synced: 5 months ago
JSON representation
A simple web app to predict stock prices(USD) made with Flask(python).
- Host: GitHub
- URL: https://github.com/nneji123/stock-price-predictor-web-app-with-flask
- Owner: Nneji123
- License: mit
- Created: 2022-05-26T15:26:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T11:03:38.000Z (over 3 years ago)
- Last Synced: 2025-05-04T21:57:11.189Z (5 months ago)
- Language: Jupyter Notebook
- Size: 624 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stock Price Predictor Web App
[](https://www.html.com)
[](https://www.css.org)
[](https://www.python.org)
[](http://www.pygame.org/news.html)

In this project I developed a machine learning model and a web app with flask for the backend and html, css for the frontend to predict stock prices.

## Data
The data used was gotten from Yahoo Finance using the yfinance api. To use the api run the following:
```py
pip install yfinance
import yfinance as yf
data = yf.download("Name of Stock","Starting date", "Ending Date", auto_adjust = true)
```
- The name of stock I used was USD
- Starting date: 2010-01-01
- Closing date: 2022-04-30## Algorithm Used
In this project I tested 3 different algorithms namely:
1. Linear Regression
2. Lasso Regression
3. Ridge Regression
4. Support Vector Machine
The final model used for the flask app was the linear regression model which had a r2 score of 0.999.## Requirements
To run a demo do the following:
1. Clone the repository.
2. Install the requirements from the requirements.txt file:
```
pip install -r requirements.txt
```
3. Then from your command line run:
```
python app.py
```
Then you can view the site on your local server: http://127.0.0.1:5000/## Deployment
The site can be deployed to heroku and can also be viewed here: https://stock-price-predictors.herokuapp.com/