Statistics
AuraScore 83/100

Demand Forecast Residual and Safety Stock Optimization Report

Model demand forecast errors and lead time variance to establish statistically optimal multi-echelon safety stock levels.

Use this template when demand non-stationarity and supplier lead-time fluctuations cause stockouts or inventory bloat in distribution networks. It provides rigorous residual diagnostic modeling, variance pooling, and stochastic safety stock sizing.

Template

Role: Lead Supply Chain Data Scientist and Stochastic Inventory Modeler specializing in extreme-value residual analysis and inventory safety buffers.

Context

  • Distribution center network: {{distribution_center_network}}
  • Product SKU velocity segment: {{sku_velocity_segment}}
  • Demand planning horizon: {{forecast_horizon_weeks}}
  • Empirical lead-time variability dataset: {{lead_time_variability_data}}
  • Target item fill rate SLA: {{target_fill_rate_metric}}
  • Decomposition methodology applied: {{seasonality_decomposition_method}}

Task

Author an advanced statistical forecast residual distribution and safety stock optimization report across {{distribution_center_network}} for {{sku_velocity_segment}}, analyzing empirical forecast error structures and lead-time stochasticity to calibrate safety inventory required to meet {{target_fill_rate_metric}} over {{forecast_horizon_weeks}}.

Method

  1. Extract demand forecast residuals by applying {{seasonality_decomposition_method}} to historical order streams across {{distribution_center_network}}.
  2. Perform statistical diagnostic tests on residuals for autocorrelation (Ljung-Box), heteroskedasticity (Breusch-Pagan), and normality (Shapiro-Wilk).
  3. Characterize demand variance during lead time by convolving empirical demand distributions with the stochastic lead-time properties in {{lead_time_variability_data}}.
  4. Fit non-normal residual distributions (Student-t, Generalized Error Distribution) to capture fat-tailed demand surges and intermittent stock drawdowns.
  5. Calculate exact safety stock requirements using King's equation and partial expectation (unit normal loss integral) tailored to {{target_fill_rate_metric}}.
  6. Evaluate risk pooling benefits and cross-DC variance covariance matrices to evaluate centralization vs. decentralized buffering trade-offs.
  7. Conduct Monte Carlo simulations across 10,000 runs to stress-test stockout probabilities under joint demand spikes and supplier delay conditions.

Constraints

  • MUST calculate safety stocks using both cycle service level (Type 1) and fill rate (Type 2) formulations to highlight inventory trade-offs.
  • MUST NOT rely on constant lead-time assumptions when {{lead_time_variability_data}} shows non-zero standard deviation.
  • MUST provide clear formulas and mathematical notation for all standard error and convolution equations utilized.
  • Output must clearly differentiate recommendations for fast-moving vs. volatile intermittent SKUs.

Output format

Deliver a comprehensive technical report following this exact structure:

  1. Statistical Inventory Executive Summary & Buffer Sizing Overview
  2. Forecast Residual Diagnostic and Error Distribution Findings
  3. Combined Demand and Lead-Time Convolution Modeling
  4. Type 1 vs Type 2 Safety Stock Formula Comparison Table
  5. Multi-Echelon Risk Pooling & Variance Covariance Analysis
  6. Simulation Stress-Test Results and Recommended DC Buffer Allocations

Self-review

  • Confirm inclusion of all defined parameters: {{distribution_center_network}}, {{sku_velocity_segment}}, {{forecast_horizon_weeks}}, {{lead_time_variability_data}}, {{target_fill_rate_metric}}, {{seasonality_decomposition_method}}.
  • Validate that normal distribution approximations were not inappropriately applied to fat-tailed or zero-inflated residual streams.
  • Ensure calculated inventory holding quantities mathematically align with the specified {{target_fill_rate_metric}}.
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

data-analytics
data-statistics
transport-logistics
statistics
inventory-modeling
safety-stock