This project predicts Amazon's stock prices using a polynomial regression model. It fetches historical stock prices, trains a regression model based on the closing prices, and forecasts future prices.
- Data Retrieval: Fetches historical stock price data for Amazon using
yfinance
. - Polynomial Regression Model: Trains a regression model based on the closing prices to predict future prices.
- Data Visualization: Plots historical stock data and prediction results for easy interpretation.
- Python 3.8 or above
- Required Python packages:
yfinance
pandas
numpy
matplotlib
scikit-learn
-
Clone this repository to your local machine:
git clone https://github.com/Furkan-Demircan/amazon-stock-prediction.git cd amazon-stock-prediction
-
Install the required Python packages:
pip install -r requirements.txt
-
Run the Jupyter Notebook:
jupyter notebook
-
Open the notebook file
Stock-Predict-Plynomal-Regression.ipynb
and execute the cells step by step.
- The notebook fetches Amazon's historical stock price data using the
yfinance
library. - A polynomial regression model is trained based on the closing prices.
- Visualizations of the historical prices and predictions are generated.
- Predictions for future dates are displayed based on the trained model.
Contributions are welcome! Please open an issue to discuss your changes before making them.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add a new feature'
). - Push to your branch (
git push origin feature/new-feature
). - Open a pull request (PR).
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions about this project, feel free to reach out:
- Email: [email protected]
- GitHub: Furkan-Demircan
Happy analyzing and predicting!