Inventory Management for Retail — Stochastic Demand

Simulate the impact of safety stock level on inventory management performance metrics assuming a normal distribution of your demand

Samir Saci
Towards Data Science

--

Inventory Management for Retail — Stochastic Demand
Inventory Management with a Stochastic Demand — (Image by Author)

Welcome to our latest article on inventory management for retail with a focus on stochastic demand.

Let us introduce a simple methodology using a discrete simulation model built with Python to test several inventory management rules, assuming a normal distribution of customer demand.

The objective is to optimize your inventory management performance metrics, including cycle service level (CSL) and item fill rate (IFR), while taking into account factors such as purchase cost, selling price, lead time, and cost of shortage.

This article will provide valuable insights into improving your replenishment policy and compensating for demand volatility.

Introduction

For most retailers, inventory management systems take a fixed, rule-based approach to forecast and replenishment order management.

Considering the distribution of the demand, the objective is to build a replenishment policy that will minimize your ordering, holding and shortage costs.

In a previous article, we built a simulation model assuming a deterministic constant demand (Units/Day).

In this article, we will improve this model and introduce a simple methodology using a discrete simulation model built with Python to test several inventory management rules assuming a normal distribution of customer demand.

💌 New articles straight in your inbox for free: Newsletter
📘 Your complete guide for Supply Chain Analytics: Analytics Cheat Sheet

SUMMARY
I. Scenario
1. Problem Statement
As an Inventory Manager of a mid-size retail chain, you are in charge of setting the replenishment quantity in the ERP.
2. Limits of the deterministic model
What could be the results with a normally distributed demand?
II. Continuous Review Policy: Order Point, Order Quantity (s, Q)
1. Introduction of the Inventory Policy
2. Definition of the Safety Stock
3. How do you define k?
III. Example of replenishment policies

1. Target of CSL = 95%
2. Target of IFR = 99%
III. Conclusion
1.
2. Next Steps

I. Scenario

Problem Statement

As an Inventory Manager of a mid-size retail chain, you are in charge of setting the replenishment quantity in the ERP.

Based on the feedback of the store manager, you start to doubt that the replenishment rules of the ERP are the most optimal, especially for the fast runners, because your stores are facing lost sales due to stock-outs.

For each SKU, you would like to build a simple simulation model to test several inventory rules and estimate the impact on:

Performance Metrics

  • Cycle Service Level (CSL): probability to have a stock-out for each cycle (%)
  • Item Fill Rate (IFR): percentage of customer demand met without stock-out (%)

In this article, we will build this model for,

# Total Demand (units/year)
D = 2000
# Number of days of sales per year (days)
T_total = 365
# Customer demand per day (unit/day)
D_day = D/T_total
# Purchase cost of the product (Euros/unit)
c = 50
# Cost of placing an order (/order)
c_t = 500
# Holding Cost (% unit cost per year)
h = .25
c_e = h * c
# Selling Price (Euros/unit)
p = 75
# Lead Time between ordering and receiving
LD
# Cost of shortage (Euros/unit)
c_s = 12
# Order Quantity
Q = 82 (units/order)

To simplify the comprehension, let’s introduce some notations

Notations— (Image by Author)

Limits of the deterministic model

In the previous article, we assumed a constant deterministic of demand; we’ll now introduce randomness to get closer to real demand.

Inventory Management for Retail with Constant Demand
Initial model with constant demand D = 5.4 units/day — (Image by Author)

What could be the results with a normally distributed demand?

Notations — (Image by Author)
µ_D = 2000 (items/year)
σ_D = 50(items/year)
Inventory Management for Retail with Normally Distributed Demand
Initial model with Stochastic Yearly Demand Distribution N(2000, 50) — (Image by Author)

You need to improve your replenishment policy to compensate for the volatility of your demand.

Have you heard about the inventory turnover KPI?
Learn more about it in this short clip,

💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.

II. Continuous Review Policy: Order Point, Order Quantity (s, Q)

Code

You can find the full code in my Github repository: Link (Follow me :D)
My portfolio with other projects:
Samir Saci

Introduction of the Inventory Policy

To solve this issue of demand volatility, we’ll introduce a continuous review policy (s, Q)

  • Continuous Review: the inventory level will be checked every day
  • (s, Q) = If the inventory level ≤ s, your ERP will order Q

To simplify the comprehension, let’s introduce some notations:

Notations — (Image by Author)

Definition of the Safety Stock

The reorder point can be defined as the minimum inventory level you need to meet your customers’ demand during the lead time between your ordering and receiving.

The safety stock is a buffer to compensate for the volatility of the demand.

How do you define k?

The safety stock level will directly impact your performance metrics; the highest k is the best your performance will be:

  1. You fix your target for any of the two metrics (e.g, I want my CSL to be 95%)
  2. You calculate k to reach this target
  3. You fix your reorder point

III. Example of replenishment policies

Target of CSL = 95%

Based on the definition of the CSL, we have:

Equations — (Image by Author)
k = 1.64
Reoder point with CSL: 36 units
Inventory Management for Retail (s, Q) Replenishment Rule
(s, Q) model with s = 32 units— (Image by Author)

Comments

In this example, we can see that we do not face any stock and the minimum stock level is very close to zero.

Code

2. Target of IFR = 99%

In this previous example, our target was to have 95% of the replenishment cycles without stock-out.

In this example, we’ll focus more on our capacity to deliver products in full with an IFR target.

This formula uses the Unit Normal Loss Function (you can find more information about this function here: Link).

Equations — (Image by Author)
Optimal Value of k for IFR = 99% — (Image by Author)
# G(k) = Q/sigma_ld * (1 - IFR)
IFR = 0.99
G_k = (Q/sigma_ld) * (1 - IFR) = 0.14
# Final value of k
k = 0.71
Reoder point with CSL: 31 units
(s, Q) model with s = 31 units — (Image by Author)

Comments

To reach 99% of demand units fulfilled without stock-out you need a lower safety stock. (31 units vs. 32 units)

Code

IV. Conclusion and next steps

Simulation Model with ChatGPT — “The Supply Chain Analyst”

Large Language Models like GPT can support the analysis of your inventory management rules and interact with users.

What is the optimal rule to minimize my ordering costs?

I introduce a custom GPT designed to automate Supply Chain Analytics tasks in this article.

“The Supply Chain Analyst” — (Image by Author)

This initial prototype is a proof of concept.

OpenAI’s GPTs can be used with advanced analytics models in Python scripts to create interactive analytics products.

“The Supply Chain Analyst”: Inventory Management Module — (Image by Author)

We can imagine users uploading their sales and interacting with the agent to understand how to set an optimal rule.

For more details,

Next Steps

This improved model brings better results by considering the demand variability in the safety stock sizing.

The process is simple: you start by fixing your performance metrics targets (IRF, CSL), and then you calculate your safety stock level using the k value.

The main issue with the continuous review policy is the high number of replenishments if you have many SKUs in your portfolio.

As a store manager (or Warehouse Manager), you would prefer to fix the replenishment time (e.g.: 2 times per week).

Therefore, we will introduce the periodic review policy in the next article.

About Me

Let’s connect on Linkedin and Twitter, I am a Supply Chain Engineer using data analytics to improve logistics operations and reduce costs.

If you are interested in Data Analytics and Supply Chain, have a look at my website

References

--

--

Top Supply Chain Analytics Writer — Follow my journey using Data Science for Supply Chain Sustainability 🌳 and Productivity ⌛