šŸ”¬ Time Series Lab: Operation Forecast

90 minutes to build a production-ready forecasting system

⚔ URGENT MISSION BRIEF

Situation: MegaRetail's inventory system is hemorrhaging $75M annually. The board has given you 90 minutes to build and deploy a forecasting engine that will transform the company's supply chain.

Your Objective: Implement a complete time series forecasting system with ARIMA modeling, dynamic safety stock calculation, and multi-SKU optimization.

Success Criteria: Achieve <10% MAPE, >95% service level, and demonstrate $50M+ in annual savings.

Stakes: Success = Chief Innovation Officer promotion. Failure = Company faces hostile takeover.

0%
šŸ“Š Task 1: Load and Prepare Time Series Data
Estimated: 15 min

First, we need to load three years of sales history and prepare it for analysis. This data contains hidden patterns worth millions.

data_preparation.py
Hint: For the trend, use: 100000 + np.arange(n_days) * 100. For seasonality, use sine waves with period 365.25. For holidays, create spikes on specific dates using conditionals.
šŸ” Task 2: Decompose Time Series Components
Estimated: 10 min

Identify the hidden patterns in your sales data using STL decomposition. Each component reveals a different business insight.

decomposition.py
šŸ¤– Task 3: Build ARIMA Forecasting Model
Estimated: 20 min

Implement an auto-ARIMA model that will predict future demand with precision. This is where the $50M savings begin.

arima_model.py

Model Validation Tests:

MAPE < 10% PENDING
Residuals White Noise PENDING
No Autocorrelation PENDING
Forecast Within CI PENDING

⚔ URGENT CHALLENGE: Black Friday in 30 Days!

The CEO just called - Black Friday is approaching and last year we lost $10M in sales due to stockouts.

Modify your forecast to account for the 500% demand spike!

šŸ›”ļø Task 4: Calculate Dynamic Safety Stock
Estimated: 15 min

Replace static safety stock with dynamic calculations based on forecast uncertainty. This is where we save $35M annually.

safety_stock.py