# AI-driven pricing and markdown optimization
A fashion retailer walks into February with 40,000 winter coats still on the shelf. Each week they sit, they lose value: the coats go out of style, warehouse space costs money, and spring inventory is already arriving. The question is not *whether* to discount. It is *when*, *how deep*, and *which items* to cut, so the retailer clears stock without giving away margin it did not have to.
This is the markdown problem. It has haunted retail for decades. AI now attacks it with math that no human buyer could run by hand.
Retail pricing looks simple: pick a number, sell the item. It is not.
A single fashion retailer might carry tens of thousands of SKUs (stock keeping units, meaning each unique product variant such as a red coat in size medium). Each SKU has its own demand curve, its own competitors, and its own shelf life. A wool coat behaves nothing like a basic white tee.
Three forces collide:
Human buyers traditionally used gut feel and simple rules ("mark down 20% after week 6"). AI replaces the rule of thumb with a model tuned to each product.
Price elasticity of demandPrice elasticity of demandHow sensitive demand is to a price change. High elasticity means customers react strongly to price increases.Voir la définition complète → measures how much sales volume changes when you change price. If a 10% price cut lifts units sold by 30%, demand is *elastic*: shoppers are price sensitive. If that same cut lifts sales only 3%, demand is *inelastic*: price barely moves them.
This is the core input for every pricing model.
A concrete example:
AI estimates elasticity per product (or product cluster) from historical sales, promotions, weather, competitor prices, and web traffic. Where a product is new and has no history, the model borrows from similar items, a technique called *cold start* handling.
Here is a simplified log-log regression, the classic starting point elasticity teams still use:
import numpy as np
import statsmodels.api as sm
# Historical weekly data for one product
log_price = np.log(price) # e.g. weekly price
log_units = np.log(units_sold) # e.g. weekly units
X = sm.add_constant(log_price)
model = sm.OLS(log_units, X).fit()
elasticity = model.params[1] # the slope IS the elasticity
print(f"Elasticity: {elasticity:.2f}")
# -1.8 means a 1% price rise drops units ~1.8%: elasticThe slope of price against volume, on a log scale, *is* the elasticity. A value more negative than minus one means elastic; between zero and minus one means inelastic. Real systems layer in seasonality, competitor data, and machine learning models that beat plain regression, but the intuition holds.
If you want to go deeper on the economics, the OpenStax Principles of Economics chapter on elasticity is a free, solid primer.
Before markdowns, AI sets the *base price*: the full ticket price at launch.
The model weighs:
The output is a price that maximizes expected profit given the demand curve, not just cost plus a fixed markup. This is why the same jacket can carry different prices at a discount chain versus a department store: their models, and their customers' elasticity, differ.
Now back to those 40,000 coats.
A markdown is a permanent price cut for clearance, distinct from a temporary promotion. The goal: sell remaining units before their value hits zero at season end.
The trap is that markdowns compound. Cut 20% now and you may not need to cut 50% later. But cut too early on a product that would have sold at full price, and you have donated margin to customers who would have paid more.
This is a *sequential decision* problem. Each week's choice changes what is left and what you can do next. That structure is exactly what reinforcement learning is built for.
Reinforcement learning (RL) is a type of AI where an "agent" learns by trial and error to maximize a long-term reward. Think of it as learning to play a game: the agent takes actions, sees results, and adjusts.
MapMapUsing software to automate repetitive marketing tasks and campaigns, enabling personalisation at scale across channels like email, web, and social.Voir la définition complète → it to markdowns:
The agent learns a *policy*: a rule for what markdown to take in any state. Crucially, it optimizes across the *whole* season, not just this week. It might hold price now because the model predicts a demand spike (a holiday, a cold snap) that would waste an early discount.
Why RL beats fixed rules:
Retailers rarely let a model run fully autonomous on day one. Most use *human in the loop*: the AI recommends, a pricing manager approves, and overrides feed back into the model. Because pure trial and error on live prices is risky and slow, teams train RL agents in *simulation* first, using a demand model built from historical data as a synthetic sandbox.
An unconstrained model will do dumb things: undercut a flagship product to zero, or price identical items differently in ways that anger customers. Real systems bolt on business rules:
There are also legal lines. Pricing based on protected characteristics, or coordinating prices with competitors, can be illegal in many markets. And *dynamic pricingdynamic pricingAutomatically adjusting prices in real time based on demand, competition or user behaviour to optimise revenue, margin or conversion.Voir la définition complète →* (prices that shift by demand or time) draws consumer-protection scrutiny when it feels like surge gouging. Keep legal and compliance teams close. This lesson is not legal advice.
Vérification des acquis
1. Why is the markdown problem best described as a question of timing and depth rather than simply whether to discount?
2. A product whose sales volume barely increases when its price is cut is best described as having what kind of demand?
3. Why does AI offer an advantage over the traditional 'mark down 20% after week 6' rule of thumb?
4. Select ALL correct answers about the competing forces that make retail pricing difficult.
Sélectionnez toutes les réponses correctes.
5. Select ALL correct answers about price elasticity of demand and its role in pricing models.
Sélectionnez toutes les réponses correctes.
Return to the 40,000 coats, ten weeks from season end.
Week 1: The elasticity model flags coats as moderately elastic. The RL agent sees healthy inventory and a cold-weather forecast. It recommends *holding* full price. Human manager approves.
Week 4: A mild spell slows sales. Inventory is behind plan. The agent recommends a 15% markdown on the slowest colors only, keeping bestsellers at full price. This is *targeted* markdown, not blanket.
Week 7: Still 12,000 units left. The agent, weighing the near-zero salvage value of leftover coats, steps to 35%. It times the cut to a weekend and a competitor's own sale, where elasticity is highest.
Week 10: Final clearance at 60% to hit a target sell-through and free the floor for spring.
The result the retailer wants: higher total margin than a fixed "20% after week 6" rule, because discounts were smaller, later, and aimed only where they moved units.
The math is the easy part. The hard parts: