HLI

Haidar Labib Izzakif • Data Analyst

INITIALIZING SYSTEM0%
Back to All Projects
Time Series & Predictive AnalyticsCase Study • Technical Overview

Predictive Multi-Market Sales Forecasting System

An end-to-end forecasting pipeline that ingests historical sales, macro-economic factors, local holidays, and inventory pipeline metrics to generate daily 90-day forward demand projections across multiple warehouses.

PythonProphetLightGBMPandasScikit-LearnTableauPostgreSQL
94.6%
Forecast Accuracy
-41%
Stockout Cut
$310K
Holding Savings
5.4%
MAPE Score

1. Business Problem & Objective

Frequent stockouts during peak holiday demand cycles led to customer churn and an estimated $1.2M in uncaptured retail orders, while overstocking off-season inventory incurred excessive holding costs.

2. Dataset Description

5 years of regional daily sales logs across 12 distribution centers, combined with national inflation data, weather patterns, and promotional calendar metadata (3.8M records).

3. Data Cleaning & Preprocessing

  • Resampled irregular timestamped sales events into uniform daily frequency series.
  • Applied STL decomposition to isolate seasonal trend components from irregular noise.
  • Calculated rolling statistics (7-day, 30-day, 90-day moving averages and standard deviations).

4. Methodology & Machine Learning Architecture

Analytical Steps

  • Ensemble approach combining Facebook Prophet for strong trend/holiday seasonality and LightGBM for non-linear feature interactions.
  • Walk-forward cross-validation strategy to prevent lookahead bias.
  • Hyperparameter tuning via Bayesian Optimization (Optuna).

Model Development & Evaluation

Achieved a MAPE (Mean Absolute Percentage Error) of 5.4% on out-of-sample testing data, significantly outperforming traditional ARIMA baselines (MAPE 14.2%).

PYTHON Implementation SnippetRead-only
from prophet import Prophet
import lightgbm as lgb

# Initialize Prophet Model with custom holiday rules
m = Prophet(yearly_seasonality=True, weekly_seasonality=True, daily_seasonality=False)
m.add_country_holidays(country_name='US')
m.fit(train_df)

future = m.make_future_dataframe(periods=90)
forecast = m.predict(future)
print(forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail())

5. Results & Strategic Business Insights

Key Results Achieved

  • Reduced warehouse stockouts by 41% during Q4 holiday rush.
  • Decreased excess holding costs by $310,000 annually.
  • Automated daily report generation, saving 15 analyst hours per week.

Actionable Insights

  • Weather anomalies (temperature drops below 10°C) triggered a 3.2x demand surge in winter apparel 48 hours in advance.
  • Promotional momentum lingers for 5 days post-campaign, requiring sustained stock reserves.