Mastering the Art of Pricing Optimization - A Data Science Solution

Rhydham Gupta28 Aug 2023

Problem

A retailer must set prices for thousands of items in each store, and the same item can cost different amounts in different stores. Promotions, holidays and trend move sales too, so comparing sales before and after a price change misleads. Without separating the price effect, a cut can lose margin without adding enough units, and a rise can lose too many buyers. Recommended prices must also respect business rules.

Example from the article: a snack item, Yochips, in one California store with a current price of $3.23 and about 3 years of weekly data. The store manager allows price moves of at most 20% in either direction.

Solution in brief

Strip promotions and events out of sales to get baseline units, then regress log baseline units on log price to get the item's price elasticity. Plug elasticity, current baseline units and the current price into a revenue formula and maximize it numerically inside the allowed price range. Finish with business-rule post-processing.

Questions this case answers
  • How to choose a price for each of thousands of items from observational price-change history when sales are also driven by promotions, holidays and trend
  • How to set item prices per store so that sales do not collapse and revenue grows?
  • How to estimate price elasticity from historical sales polluted by promotions and holidays?
  • How to keep estimated elasticities and recommended prices within sane limits?

Tools and methods

  • Prophet — decomposes log sales into trend and event effects; the trend is the baseline.
  • Log-log regression with bounded coefficient — elasticity is the slope of log baseline units on log price, fitted by an optimizer with bounds.
  • SciPy minimize — fits the bounded regression and then finds the revenue-maximizing price within bounds.
Continue reading — it's free

Google or a one-time email code. No password.