Update README.md
Browse files
README.md
CHANGED
|
@@ -15,14 +15,14 @@ metrics:
|
|
| 15 |
- mape
|
| 16 |
---
|
| 17 |
|
| 18 |
-
#
|
| 19 |
|
| 20 |
This repository contains an **LSTM model** trained on stock closing prices and compared with a traditional ARIMA baseline.
|
| 21 |
The goal is to forecast future stock values and evaluate which approach generalizes better.
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
-
##
|
| 26 |
- **Source:** Yahoo Finance
|
| 27 |
- **Ticker:** Apple Inc. (AAPL)
|
| 28 |
- **Period:** 2015β2023
|
|
@@ -30,31 +30,31 @@ The goal is to forecast future stock values and evaluate which approach generali
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
-
##
|
| 34 |
- **ARIMA (Auto ARIMA)** β traditional statistical time-series forecasting
|
| 35 |
- **LSTM** β deep learning recurrent neural network for sequential data
|
| 36 |
|
| 37 |
---
|
| 38 |
|
| 39 |
-
##
|
| 40 |
|
| 41 |
| Model | RMSE | MAPE |
|
| 42 |
|-------|-----------|----------|
|
| 43 |
| ARIMA | 15.796 | 0.0857 |
|
| 44 |
| LSTM | 7.533 | 0.0397 |
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
-
##
|
| 51 |
|
| 52 |
Below is an example forecast visualization (LSTM predictions vs actual stock prices):
|
| 53 |
|
| 54 |

|
| 55 |
|
| 56 |
---
|
| 57 |
-
##
|
| 58 |
|
| 59 |
**ARIMA Forecast:**
|
| 60 |

|
|
@@ -62,14 +62,14 @@ Below is an example forecast visualization (LSTM predictions vs actual stock pri
|
|
| 62 |
**LSTM Forecast:**
|
| 63 |

|
| 64 |
|
| 65 |
-
##
|
| 66 |
- Model hosted on **Hugging Face Hub**
|
| 67 |
- Repository: `Jalal10/DataSynthis_ML_JobTask`
|
| 68 |
- Includes model weights (`lstm_stock_model.h5`) and usage instructions
|
| 69 |
|
| 70 |
---
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
```python
|
| 75 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 15 |
- mape
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# LSTM Stock Price Forecasting
|
| 19 |
|
| 20 |
This repository contains an **LSTM model** trained on stock closing prices and compared with a traditional ARIMA baseline.
|
| 21 |
The goal is to forecast future stock values and evaluate which approach generalizes better.
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
+
## Dataset
|
| 26 |
- **Source:** Yahoo Finance
|
| 27 |
- **Ticker:** Apple Inc. (AAPL)
|
| 28 |
- **Period:** 2015β2023
|
|
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## Models Implemented
|
| 34 |
- **ARIMA (Auto ARIMA)** β traditional statistical time-series forecasting
|
| 35 |
- **LSTM** β deep learning recurrent neural network for sequential data
|
| 36 |
|
| 37 |
---
|
| 38 |
|
| 39 |
+
## Evaluation Results
|
| 40 |
|
| 41 |
| Model | RMSE | MAPE |
|
| 42 |
|-------|-----------|----------|
|
| 43 |
| ARIMA | 15.796 | 0.0857 |
|
| 44 |
| LSTM | 7.533 | 0.0397 |
|
| 45 |
|
| 46 |
+
**Conclusion:** LSTM significantly outperforms ARIMA with lower RMSE and MAPE, showing its ability to capture nonlinear patterns in stock prices.
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
+
## Example Forecast Plot
|
| 51 |
|
| 52 |
Below is an example forecast visualization (LSTM predictions vs actual stock prices):
|
| 53 |
|
| 54 |

|
| 55 |
|
| 56 |
---
|
| 57 |
+
## ARIMA vs LSTM Forecasts
|
| 58 |
|
| 59 |
**ARIMA Forecast:**
|
| 60 |

|
|
|
|
| 62 |
**LSTM Forecast:**
|
| 63 |

|
| 64 |
|
| 65 |
+
## Deployment
|
| 66 |
- Model hosted on **Hugging Face Hub**
|
| 67 |
- Repository: `Jalal10/DataSynthis_ML_JobTask`
|
| 68 |
- Includes model weights (`lstm_stock_model.h5`) and usage instructions
|
| 69 |
|
| 70 |
---
|
| 71 |
|
| 72 |
+
## Usage
|
| 73 |
|
| 74 |
```python
|
| 75 |
from huggingface_hub import hf_hub_download
|