StockForecast Ensemble Model

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.

Model Description

The ensemble combines:

  • Moving Average Forecaster (window=5)
  • ARIMA Forecaster (1,1,1)
  • LSTM Neural Network
  • Transformer with Attention

Performance: RMSE=1.65, MAE=1.28, MAPE=1.25% (Best overall accuracy)

Usage

import joblib
from huggingface_hub import hf_hub_download

# Download ensemble model
model_path = hf_hub_download(repo_id="usman-tech-ali/stockforecast-ensemble-model", filename="ensemble_model.pkl")

# Load model
ensemble_model = joblib.load(model_path)

# Make predictions
predictions = ensemble_model.predict(steps=5)

Performance Comparison

Model RMSE MAE MAPE
Moving Average 2.45 1.89 1.85%
ARIMA 2.12 1.67 1.64%
LSTM 1.89 1.45 1.42%
Transformer 1.76 1.38 1.35%
Ensemble 1.65 1.28 1.25%

Citation

@software{stockforecast_ai_2025,
  title={StockForecast AI: Complete Financial Forecasting Application},
  author={Usman Ali},
  year={2025},
  url={https://github.com/usman-tech-ali/stock-forecast-app}
}
Downloads last month
11
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support