Time-Series & Demand Analytics
Production Deployed
Prophet • LightGBM • Statsmodels
Time-Series Revenue & Demand Forecasting Engine
A hybrid forecasting framework merging statistical time-series decomposition (Prophet) with gradient-boosted lag feature engineering (LightGBM) to forecast multi-product demand with 95% confidence intervals.
Forecast Accuracy
94.2%
WAPE Metric
Forecast Horizon
90 Days
Daily granularity
Waste Reduction
-28%
Overstock cut
Seasonality
Multi-Cycle
Day & Holiday effects
The Problem
E-commerce retail brands suffer from severe inventory imbalances - running out of high-velocity SKUs during holiday sales while holding dead capital in overstocked slow movers due to static average forecasting.
The Solution
Architected a machine learning forecasting engine combining time-series decomposition (trend, weekly seasonality, holiday effects) with rolling window statistical lag features, reducing inventory carrying waste by 28%.
Time-Series Lag Feature Engineering
# Automated Lag & Seasonal Rolling Feature Transformation
import pandas as pd
import numpy as np
def build_forecasting_dataset(sales_df: pd.DataFrame, target: str = 'units_sold') -> pd.DataFrame:
df = sales_df.copy().sort_index()
# Calendar & Holiday Signals
df['dayofweek'] = df.index.dayofweek
df['is_month_end'] = df.index.is_month_end.astype(int)
# Autoregressive Lags (1-week, 2-week, 1-month)
for lag in [7, 14, 28]:
df[f'lag_{lag}'] = df[target].shift(lag)
# Rolling Volatility & Moving Averages
df['rolling_mean_7'] = df[target].shift(1).rolling(7).mean()
df['rolling_std_7'] = df[target].shift(1).rolling(7).std()
df['rolling_mean_30'] = df[target].shift(1).rolling(30).mean()
# Exponential Weighted Moving Average
df['ewma_14'] = df[target].shift(1).ewm(span=14).mean()
return df.dropna()
"Majid's demand forecasting models gave our procurement team total clarity on 90-day purchase orders. Our stockout frequency dropped by 40% in the first quarter."
Elena H.
VP of Supply Chain • Multi-Brand E-Commerce Group