This project is a Jupyter Notebook designed for analyzing and forecasting historical closing prices of various stocks. It leverages Python's machine learning, data analysis, and visualization tools.
- Data Retrieval: Downloads historical stock closing prices for specified date ranges using the
yfinance
library. - Data Visualization: Provides graphical representations of price movements.
- Machine Learning Models: Implements models like LSTM for price forecasting. The model is trained on the closing prices of four different stocks.
- Dropout and Early Stopping: Applies Dropout layers and Early Stopping techniques to improve model accuracy and prevent overfitting.
- Performance Metrics: Evaluates models using various metrics (e.g., MAE, RMSE).
- Python 3.8 or above
- Required Python packages:
yfinance
,pandas
,numpy
,tensorflow
,matplotlib
,sklearn
-
Clone this repository to your local machine:
git clone https://github.com/Furkan-Demircan/stock-analysis.git cd stock-analysis
-
Install the required Python packages:
pip install -r requirements.txt
-
Start Jupyter Notebook:
jupyter notebook
- After starting Jupyter Notebook, open the
Stock-Predict-LSTM-Neural-Network.ipynb
file. - Select specific stocks and date ranges to run the analysis.
- Train the models to forecast stock prices and evaluate the results. You can customize Dropout and Early Stopping settings to improve model accuracy.
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).
For questions or suggestions about this project, feel free to contact us:
- Email: [email protected]
- GitHub: Furkan-Demircan
Happy analyzing!