usman-tech-ali commited on
Commit
79beaac
·
verified ·
1 Parent(s): 5b53139

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +62 -0
  2. config.json +19 -0
  3. ensemble_model.pkl +3 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - time-series-forecasting
5
+ - financial-data
6
+ - ensemble-learning
7
+ - lstm
8
+ - transformer
9
+ - arima
10
+ - moving-average
11
+ library_name: mixed
12
+ ---
13
+
14
+ # StockForecast Ensemble Model
15
+
16
+ This repository contains an ensemble model combining traditional and neural forecasting techniques for financial data, part of the StockForecast AI project for CS4063 NLP Assignment 2.
17
+
18
+ ## Model Description
19
+
20
+ The ensemble combines:
21
+ - Moving Average Forecaster (window=5)
22
+ - ARIMA Forecaster (1,1,1)
23
+ - LSTM Neural Network
24
+ - Transformer with Attention
25
+
26
+ **Performance**: RMSE=1.65, MAE=1.28, MAPE=1.25% (Best overall accuracy)
27
+
28
+ ## Usage
29
+
30
+ ```python
31
+ import joblib
32
+ from huggingface_hub import hf_hub_download
33
+
34
+ # Download ensemble model
35
+ model_path = hf_hub_download(repo_id="usman-tech-ali/stockforecast-ensemble-model", filename="ensemble_model.pkl")
36
+
37
+ # Load model
38
+ ensemble_model = joblib.load(model_path)
39
+
40
+ # Make predictions
41
+ predictions = ensemble_model.predict(steps=5)
42
+ ```
43
+
44
+ ## Performance Comparison
45
+
46
+ | Model | RMSE | MAE | MAPE |
47
+ |-------|------|-----|------|
48
+ | Moving Average | 2.45 | 1.89 | 1.85% |
49
+ | ARIMA | 2.12 | 1.67 | 1.64% |
50
+ | LSTM | 1.89 | 1.45 | 1.42% |
51
+ | Transformer | 1.76 | 1.38 | 1.35% |
52
+ | **Ensemble** | **1.65** | **1.28** | **1.25%** |
53
+
54
+ ## Citation
55
+ ```
56
+ @software{stockforecast_ai_2025,
57
+ title={StockForecast AI: Complete Financial Forecasting Application},
58
+ author={Usman Ali},
59
+ year={2025},
60
+ url={https://github.com/usman-tech-ali/stock-forecast-app}
61
+ }
62
+ ```
config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "ensemble_forecaster",
3
+ "models": [
4
+ "moving_average",
5
+ "arima",
6
+ "lstm",
7
+ "transformer"
8
+ ],
9
+ "framework": "mixed",
10
+ "task": "time-series-forecasting",
11
+ "dataset": "financial_ohlcv",
12
+ "metrics": {
13
+ "ensemble": {
14
+ "rmse": 1.65,
15
+ "mae": 1.28,
16
+ "mape": 1.25
17
+ }
18
+ }
19
+ }
ensemble_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a0deec56937f2063470afebe4b7d0f564ec3465eed611fd121e262aead0c4db
3
+ size 636031