Baseline Margin
$75,014
Static 0% MD · No Transfers
Optimized Margin
$90,989
+$15,975 (+21.30%)
Service Level
98.49%
Baseline: 91.65%
Stockouts Prevented
2,593 u
3,157 → 564 short
Units Rebalanced
2,864 u
Intra-State Shuttles
Markdown Spend
$4,404
of $4,500 cap (97.9%)
Log-Log Price Elasticity & Cannibalization (95% Bootstrap CI)
28-Day Holdout WRMSSE: 0.615 · 95% CI Coverage: 96.3% · 2 Zero-Var SKUs Excluded
Multi-Store Net Margin & Transfer Rebalancing Curve
Store-Level Baseline vs. MILP Optimized Net Profit ($)
Intra-State Lateral Inventory Transfer Corridors & Markdown Distribution
Surplus sister stores (`CA_2`, `CA_4`, `TX_3`, `WI_3`) replenish high-velocity deficit stores within the same state (`sum(t_in - t_out) = 0`)
SKU-Store Action Manifest (120 Active Series)
Click column headers to sort · Zero-variance SKUs (`FOODS_1_004`, `HOBBIES_2_031`) locked to 0% markdown by forensic guard
| Series (SKU · Store) | Regime | On-Hand | Markdown | Eff. Price | 4W Demand | Net Transfer | End Stock | Margin Lift ($) |
|---|
Data Integrity Score
74.2%
Penalizes zero-price-variance & stockout censoring
Zero-Variance Price Series
20 / 120
`FOODS_1_004` & `HOBBIES_2_031` (< 3 prices)
Stockout-Censored Series
70 / 120
≥5 consecutive zero-sale days on active SKUs
Syntetos-Boylan Regimes
51 Smooth · 19 Erratic
30 Intermittent · 20 Lumpy
Syntetos-Boylan Demand Regime Classification (ADI vs. CV²)
Exact theoretical cutoffs: $ ext{ADI} = 1.32$ and $ ext{CV}^2 = 0.49$ across all 120 M5 SKU-store time series
Why Forensic Auditing Wins Case Competitions
In competitions like SFU DataJam 2026, judges from Statistics Canada, SFU, and retail leaders immediately penalize teams that run naive demand regressions on raw transaction logs.
1. Unestimable Price Elasticity Guard
SKUs `FOODS_1_004` ($2.98) and `HOBBIES_2_031` ($4.97) have constant historical prices (`distinct_prices = 1`). Any regression outputting an elasticity for these items is fitting pure noise. MarginPulse flags them as `UNESTIMABLE` and locks their markdown tier to `0%`.
2. Stockout Censoring Bias Correction
When an item stocks out for 6 consecutive days at `CA_1` or `TX_2`, recorded sales drop to zero even at full demand. Training on censored zeroes biases $\hat{\epsilon}_{ii}$ toward zero. `elasticity.py` filters out `stockout_censored == 1` windows before fitting the log-log panel model.
3. Intermittent & Lumpy Tail Protection
50 of the 120 series fall into `Intermittent` ($ ext{ADI} \ge 1.32, ext{CV}^2 < 0.49$) or `Lumpy` ($ ext{ADI} \ge 1.32, ext{CV}^2 \ge 0.49$) regimes, evaluated via M5 revenue-weighted WRMSSE rather than skewed MAPE.
Econometric & MILP Mathematical Specification
1. Ridge Log-Log Panel Regression with Block Bootstrap
log(Q_{i,s,t} + 1) = α_s + ε_{ii} log(P_{i,s,t}) + ε_{ij} log(P̄_{-i,d,t}) + γ_1 Wknd_t + γ_2 SNAP_{s,t} + u_{i,s,t}
Fitted on uncensored training days ($t \le 84$) with store fixed effects $lpha_s$ and 100-iteration weekly block bootstrap to preserve autocorrelation when constructing 95% confidence intervals $[\epsilon_{2.5\%}, \epsilon_{97.5\%}]$.
2. Mixed-Integer Linear Program (`scipy.optimize.milp`)
max Σ_s [ Σ_m GM_{s,m} y_{s,m} - c_tr (t_s^in + t_s^out)/2 - p_short Short_s - h_cost EndInv_s ]
- Σ_m y_{s,m} = 1: Binary markdown tier $m \in \{0\%, 10\%, 20\%, 30\%\}$.
- I_0 + t_in - t_out - Σ_m D_{s,m} y_{s,m} + Short - EndInv = 0: Exact 4-week inventory conservation.
- Σ_{s ∈ (i, state)} (t_in - t_out) = 0: Zero net creation of stock within `CA`, `TX`, and `WI`.
- Σ_{s,m} Spend_{s,m} y_{s,m} ≤ B_cap: Global markdown budget cap.
3. Benchmark Dataset Grounding Citations