Dynamic pricing: elasticity by segment, brand constraints, an optimal clearance path and the Thompson bandit
How to replace “one price for everyone and steps by the calendar” with a calculation: find the optimal price by segment with its elasticity, impose brand constraints (a margin floor, a ceiling, a corridor between channels), choose a clearance price path by dynamic programming and test prices on live traffic with a Thompson bandit instead of a long A/B test. The decision: when and by how much to change a price without damaging the brand.
Why this document
The pricing lead and the commercial director read this when they want to move away from one price for everyone and calendar-based steps. Segments react to price differently, so their optimal prices differ, but the brand cannot go below a margin floor, above a ceiling or open a large gap between channels. A clearance price path shows how to sell the leftover by the deadline at the highest profit, and the Thompson bandit lets you test prices in live trading without sacrificing sales. Without constraints, an algorithm damages the brand and the margin.
At a glance
- What is this document and why is it needed?
- How to replace “one price for everyone and steps by the calendar” with a calculation: find the optimal price by segment with its elasticity, impose brand constraints (a margin floor, a ceiling, a corridor between channels), choose a clearance price path by dynamic programming and test prices on live traffic with a Thompson bandit instead of a long A/B test. The decision: when and by how much to change a price without damaging the brand.
- Who owns the document and how often is it rebuilt?
- The pricing lead or a category manager with an analyst; prices are reviewed weekly in season and monthly otherwise; brand protection rules are approved by the commercial director.
- What mistakes are the most common?
- Elasticity is taken from a narrow range and applied outside it → the optimal price leaves reasonable bounds → brand ceiling and floor as constraints and a test check. Price is changed more often than it is remembered → buyers wait for markdowns, the reference price is destroyed → a minimum price duration and step. Price is raised during a clearance → loss of trust and price tag complaints → a ban on increases as a hard rule.
For whom
- Brand
- A brand manages price by channel (D2C, wholesale, marketplaces, outlet): the main constraint is the price discipline of partners and protection of brand perception.
- Retail
- A retailer manages price by categories, stores and item life: the main constraints are margin, the competitive price and stock at the end of the season.
What it consists of
What a dynamic price means and where the limit is
- Dynamic pricing is a rule that changes price depending on state: stock, time to the end of the season, demand, channel. Its goal is the maximum of profit (or revenue with leftovers) under constraints; the rule must be explainable to a buyer and safe for the brand.
- Price cannot be changed more often than a buyer can remember it: frequent swings teach buyers to wait for markdowns and destroy the reference price. A minimum validity period, a step limit and a ban on increases within a clearance are part of the rules, not “algorithm settings”.
- A dynamic price by segment means different prices in different channels and conditions (outlet, site, boutique), not personal prices for a specific person; individual prices on personal data require a separate legal assessment and are usually unnecessary.
Elasticity and price by segment
- With constant elasticity e demand is d = D·(p/p₀)^(−e), and profit (p − c)·d(p) is maximal at p* = c·e/(e − 1) for e > 1. In the example cost is RUB 1,800, the list price RUB 5,000, three segments: price-sensitive (e = 3.2) with an optimum of RUB 2,618, mainstream (e = 1.8) RUB 4,050, loyal (e = 0.9 < 1) with no finite optimum: the higher the price the higher the profit until demand collapses.
- A single price gives a maximum of RUB 1.622 million at RUB 3,400, segment prices without constraints RUB 1.931 million (19% more), but for loyal customers the optimum runs into the grid ceiling, that is into the constant elasticity assumption, which is wrong at such prices.
- Elasticity is estimated by regression or an experiment and revised; an estimate over a narrow price range cannot be carried beyond it. Elasticity below one is not permission to raise price without limit but a signal to test where the elasticity boundary lies.
- Brand: D2C elasticity is estimated from price tests on the site and price promotions, wholesale from partner orders at different price levels; channel segments must not be mixed.
- Retailer: elasticity is estimated by categories and stores from weekly sales at different discounts controlling for season and traffic (the regression document), not from chain averages.
Constraints and brand protection rules
- Constraints define the feasible set of prices: a margin floor (margin of at least 30% gives a price of at least RUB 2,571), a ceiling (125% of list, RUB 6,250), a corridor between channels (outlet not below 75% of the main price, loyal not above 125% of the main), a step size and a minimum duration. The optimum is searched within this set.
- With constraints the segment prices are 2,850, 3,800, 4,750 RUB and profit RUB 1.825 million: 12.5% above the single price and 5.5% below the unconstrained optimum. The difference between them is the price of brand protection and it helps to show it explicitly: then the constraint is visible as a decision and not as an invisible loss.
- Rules are written as testable conditions (a channel price minimum and maximum relative to the recommended one, the gap between channels, the step, a ban on increases during a clearance) and every price tag change is checked; a violation blocks publication of the price.
- Brand: a partner’s breach of the corridor is recorded by monitoring marketplace and retail showcase prices and passed to contract work, not corrected by the brand’s own discount.
- Retailer: a breach of the margin floor and a mismatch between the price tag and the till are caught by automatic matching of the price list and receipts for every store and day.
The price path in a clearance
- The task: 1,200 units, 8 weeks, weekly demand at full price falls 10% a week, elasticity 2, the leftover price is RUB 1,500. A price is chosen for each week from the ladder 5,000, 4,500, 4,000, 3,500, 3,000, 2,500 RUB subject to: price does not rise and falls by no more than one step a week. The state is the week, the stock and the current step; the Bellman equation is solved from the end.
- Result: the optimal path 4,500 → 4,500 → 4,500 → 4,000 → 4,000 → 4,000 → 4,000 → RUB 4,000 gives RUB 5.051 million with leftovers and sells 100% of stock; a constant full price gives RUB 4.793 million and 71% of stock; the calendar ladder (a step down every two weeks) gives RUB 5.001 million and 98%.
- The gain of the dynamic calculation is 1% over the calendar rule and 5.4% over a constant price and depends on elasticity; its main value is showing that starting the markdown earlier pays more than waiting until the leftover becomes a problem. Demand parameters are estimated from past seasons and recomputed as the clearance proceeds.
The Thompson bandit: testing price on live traffic
- A classical A/B test splits traffic equally to the end, so half the time it sells at poor prices. The Thompson bandit for each visitor draws for every price a random value from the distribution of its conversion (Beta, updated from results), multiplies by margin and shows the price with the highest value: poor prices quickly get less and less traffic.
- In the example four prices 3,990, 4,490, 4,990, 5,490 RUB have true conversion of 5, 4.7, 3.6, 2.4%; the best by profit per visitor is the second (RUB 126.4 against RUB 114.8 for the third). Over 6,000 visitors the cumulative regret (lost profit) averaged over 24 runs is RUB 62,331 for Thompson against RUB 99,585 for equal split, that is 37% less.
- The cost of the method: in the last 1,000 visitors the best price gets on average 46% of traffic (25% for A/B), and the most frequently shown price is the best in only 67% of runs: prices close in result are told apart slowly. The bandit suits prices inside the permitted corridor; it does not replace checking the effect on repeat purchases and returns.
Brand and retailer: what to apply where
- Brand: segments are channels and countries; price dynamics in D2C and marketplace channels, while the wholesale price and the recommended retail price stay stable during the season.
- Retailer: segments are stores, regions and online; price dynamics in a clearance and on the assortment tail, while basics keep a stable price for trust.
- Brand: protection rules include a minimum gap between the outlet and the main channel, a cap on partner discount depth and a ban on public reductions below the recommended level.
- Retailer: rules include a margin floor, parity with the nearest competitors on key items and control of price in the receipt and on the price tag.
- Brand: the bandit runs on the D2C site inside the corridor, and a decision on a permanent price change is taken from results including returns and repeat purchases.
- Retailer: the clearance path is computed for a group of items with a similar life cycle; the leftover price and remaining time are set before the start and recomputed weekly.
Where the data comes from
| Data source | Fields |
|---|---|
| Sales and prices | Weekly sales and actual prices by channel and segment, stock, season start date and item life. |
| Elasticity | Elasticity estimates by segment (regression, experiment), the price range over which they were obtained and the estimate interval. |
| Brand rules and competitors | Margin floor, ceiling, corridor between channels, step and minimum price duration, prices of key competitors. |
How to build it step by step
- Step 1. State the problem: maximum profit under which constraints and over which horizon; choose the unit of decision (channel price, weekly price).
- Brand: Step 2. Define segments by channel and country, estimate each one’s elasticity and the corridor between channels; agree with partner contracts.
- Retailer: Step 3. Define segments by stores, regions and online; estimate elasticity by category and season, allow for competitor prices.
- Step 4. Write the constraints: margin floor, ceiling, corridor between channels, step, minimum duration, a ban on increases during a clearance.
- Step 5. Find optimal segment prices inside the feasible set and compare with a single price and with the unconstrained optimum; show the price of brand protection.
- Brand: Step 6. Test the new channel prices on a traffic sample with a bandit inside the corridor without changing the wholesale price in the season.
- Retailer: Step 7. For a clearance build a dynamic model: stock, weeks, a price ladder and demand with decay; compute the path and compare with the calendar rule.
- Step 8. Check stability: recompute with elasticity ±20% and demand ±15%; if the path changes a lot the rule needs simplifying.
- Step 9. Launch the rule on part of the range with control: compare profit, sales, returns and repeat purchases with a control group.
- Step 10. Fix the procedure: who approves the rules, how often recomputation runs, what blocks price publication and how exceptions are recorded.
Formulas
| Measure | Formulas | Note |
|---|---|---|
| Optimal price at constant elasticity | p* = c·e / (e − 1), e > 1; d(p) = D·(p/p₀)^(−e) | At e ≤ 1 there is no finite optimum; the brand ceiling limits price. |
| Profit with constraints | max Σ_s (p_s − c)·d_s(p_s) subject to p_s ≥ c/(1 − m_min), p_s ≤ P_max, p_outlet ≥ k·p_main | m_min is the margin floor, k the corridor between channels. |
| Clearance Bellman equation | V_t(s, j) = max_(j′∈{j, j+1}) { p_(j′)·min(s, d_t(p_(j′))) + V_(t+1)(s − min(s, d_t(p_(j′))), j′) }, V_T(s, j) = s·z | j is the price step, s the stock, z the leftover price; price does not rise and falls by no more than one step. |
| Demand with decay | d_t(p) = d_0·ρ^t·(p/p₀)^(−e) | ρ < 1 is the weekly demand decay over item life. |
| Thompson price choice | θ_k ~ Beta(1 + n⁺_k, 1 + n⁻_k); k* = argmax_k θ_k·(p_k − c) | n⁺ purchases, n⁻ non-purchases at price k. |
| Regret | R_N = Σ_(v=1..N) [ π_(k*) − π_(k_v) ], π_k = (p_k − c)·cv_k | Lost profit compared with the best price; for A/B it grows linearly. |
Formulas in notation
- Optimal price
p* = c·e / (e − 1), e > 1
Constant elasticity; at e ≤ 1 there is no optimum.- Demand
d(p) = D·(p / p₀)^{−e}
A power demand function.- Constrained problem
max Σ_s (p_s − c)·d_s(p_s); p_s ≥ c/(1−m_min); p_s ≤ P_max; p_outlet ≥ k·p_main
The feasible set is set by the brand.- Bellman
V_t(s, j) = max_{j′∈{j,j+1}} { p_{j′}·q_t + V_{t+1}(s − q_t, j′) }, q_t = min(s, d_t(p_{j′}))
Solved from the end of the horizon.- Decaying demand
d_t(p) = d_0·ρ^t·(p / p₀)^{−e}
ρ < 1: falling interest by week.
Worked example
Three price schemes: prices by segment and weekly profit
| Scheme | Price, sensitive, RUB | Price, mainstream, RUB | Price, loyal, RUB | Profit, RUB thousand |
|---|---|---|---|---|
| One price for all segments | 3,400 | 3,400 | 3,400 | 1,622 |
| Segment prices with brand constraints | 2,850 | 3,800 | 4,750 | 1,825 |
| Segment prices without constraints (grid ceiling) | 2,600 | 4,050 | 7,000 | 1,931 |
Cost RUB 1,800, list price RUB 5,000, demand at full price of 100, 250, 120 units a week for the segments, elasticity 3.2, 1.8, 0.9; a price grid with a RUB 50 step. In the unconstrained scheme the loyal price ran into the grid ceiling (RUB 7,000). The data is illustrative.
Figures
- Price-sensitive
- Mainstream
- Loyal
Data as a table
| Measure | Price-sensitive | Mainstream | Loyal |
|---|---|---|---|
| 2000 | 375 | 260 | 55 |
| 2250 | 579 | 474 | 111 |
| 2500 | 643 | 609 | 157 |
| 2750 | 644 | 697 | 195 |
| 3000 | 615 | 752 | 228 |
| 3250 | 575 | 787 | 256 |
| 3500 | 532 | 808 | 281 |
| 3750 | 490 | 818 | 303 |
| 4000 | 449 | 822 | 323 |
| 4250 | 412 | 821 | 340 |
| 4500 | 378 | 816 | 356 |
| 4750 | 348 | 809 | 371 |
| 5000 | 320 | 800 | 384 |
| 5250 | 295 | 790 | 396 |
| 5500 | 273 | 779 | 408 |
| 5750 | 253 | 768 | 418 |
| 6000 | 234 | 756 | 428 |
| 6250 | 218 | 744 | 437 |
| 6500 | 203 | 733 | 445 |
| 6750 | 189 | 721 | 453 |
| 7000 | 177 | 709 | 461 |
Segment profit as a function of price. For price-sensitive customers the maximum is near RUB 2,618, for the mainstream near RUB 4,050, for loyal customers profit keeps rising to the ceiling: for them a brand limit is needed rather than a formula. Axis: price, RUB.
Data as a table
| Measure | Weekly profit |
|---|---|
| One price | 1,622 |
| With constraints | 1,825 |
| Unconstrained | 1,931 |
Profit under three price schemes. Segment prices with brand constraints give RUB 1.825 million against 1622 at a single price; the unconstrained variant of RUB 1.931 million shows the price of brand protection.
- Optimal
- Calendar ladder
- Full price
Data as a table
| Measure | Optimal | Calendar ladder | Full price |
|---|---|---|---|
| 1 | 4,500 | 5,000 | 5,000 |
| 2 | 4,500 | 5,000 | 5,000 |
| 3 | 4,500 | 4,500 | 5,000 |
| 4 | 4,000 | 4,500 | 5,000 |
| 5 | 4,000 | 4,000 | 5,000 |
| 6 | 4,000 | 4,000 | 5,000 |
| 7 | 4,000 | 3,500 | 5,000 |
| 8 | 4,000 | 3,500 | 5,000 |
Clearance price path: three rules. The optimal path starts at RUB 4,500 and then lowers the price 1 time(s) to RUB 4,000, selling 100% of stock; a full price leaves 29% of leftovers, the calendar ladder lowers price 3 times. Axis: clearance week.
- Thompson
- Equal-split A/B
Data as a table
| Measure | Thompson | Equal-split A/B |
|---|---|---|
| 250 | 4,019 | 4,133 |
| 500 | 7,828 | 8,299 |
| 1000 | 14.9k | 16.6k |
| 2000 | 26.2k | 33.2k |
| 3500 | 40.1k | 58.1k |
| 6000 | 62.3k | 99.6k |
Cumulative regret: Thompson bandit against A/B. A/B regret grows linearly, Thompson’s slows: by 6,000 visitors RUB 62,331 against RUB 99,585 (an average of 24 runs). Axis: number of visitors.
- Thompson
- Equal-split A/B
Data as a table
| Measure | Thompson | Equal-split A/B |
|---|---|---|
| 3 990 | 12.4 | 25 |
| 4 490 | 46.3 | 25 |
| 4 990 | 34.4 | 25 |
| 5 490 | 6.9 | 25 |
Traffic share by price in the last 1,000 visitors. Thompson concentrates traffic on the two best prices (46 and 34%), A/B keeps 25% on each, including the worst. Axis: price, RUB.
Specifics by category
- Apparel
- Clearance of seasonal collections and a life cycle of 8-12 weeks: the dynamic path gives the main gain; basics are held stable so as not to devalue the reference price.
- Footwear
- Sizes break a clearance: price is set by model allowing for the completeness of the size run; when the run is broken markdown depth grows while demand for the remaining sizes does not.
- Accessories
- Gift demand is inelastic before holidays and elastic after: price dynamics are tied to the event calendar, discounts before a holiday rarely pay.
- Kids
- Sizes go obsolete quickly, the season is rigid: the clearance path starts earlier, and school items are not marked down before the school year starts; price accessibility is a priority.
- Men
- Less elastic demand and a stable base: less dynamics, more constant prices; dynamics apply to seasonal leftovers and clearance, not to the core.
- Women
- High fashion elasticity and fast obsolescence: price dynamics and the bandit give the largest effect; brand constraints (the corridor between channels, a ban on increases) are especially important.
Common mistakes
- Elasticity is taken from a narrow range and applied outside it → the optimal price leaves reasonable bounds → brand ceiling and floor as constraints and a test check.
- Price is changed more often than it is remembered → buyers wait for markdowns, the reference price is destroyed → a minimum price duration and step.
- Price is raised during a clearance → loss of trust and price tag complaints → a ban on increases as a hard rule.
- A bandit is launched without a corridor → prices below margin appear in the test → the feasible set of prices is defined before launch.
- Price is judged by conversion without returns and repeat purchases → a low price looks best → the target metric is profit after returns.
Russian specifics
- The price on the tag and at payment must match and information about price and discount must not mislead; frequent price changes are acceptable only with correct and timely changes of tags and receipts. Rule: Law 2300-1 of 07.02.1992: Law of 07.02.1992 No. 2300-1 on consumer rights protection (rule check not completed).
- Brand: a recommended price must not turn into price coordination between competitors, and control of partner prices needs a legal check; price information exchange is limited by competition protection requirements. Rule: Law 135-FZ of 26.07.2006: Federal Law of 26.07.2006 No. 135-FZ on protection of competition (rule check not completed).