What does Critical Fractiles for Pre-Season Buying conclude, in numbers, about “A Finite-Horizon Dynamic Programme for End-of-Season Markdowns: When to Cut and by How Much”?
Answer: Chapter 5 solves for an end-of-season markdown table by finite-horizon dynamic programming; a weeks-of-cover rule earns at least 0.9878 of optimal revenue, while calendar markdowns do worse than holding the price when stock is thin.
Scope of the numbers: Its goods, stores and demand parameters are illustrative; all calculations are generated by its programs; the book is not individual business advice. Chapter 1 derives the critical fractile from marginal arithmetic; under illustrative parameters the optimal order equals the mean only at a margin of exactly 0.3750, and ordering the mean for an eight-tenths-margin item loses 6.96 % of expected profit.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.9878
| start n | rule | E[revenue] | E[units left] | vs optimal |
|---|---|---|---|---|
| 20 | never | 1849.0 | 1.78 | 0.9859 |
| 20 | calendar | 1761.8 | 0.04 | 0.9394 |
| 20 | cover | 1873.8 | 0.56 | 0.9991 |
| 20 | optimal | 1875.4 | 0.60 | 1.0000 |
| 30 | never | 2147.3 | 10.03 | 0.9052 |
| 30 | calendar | 2314.6 | 1.84 | 0.9758 |
| 30 | cover | 2357.0 | 0.57 | 0.9936 |
| 30 | optimal | 2372.2 | 1.38 | 1.0000 |
| 40 | never | 2300.0 | 20.00 | 0.8305 |
| 40 | calendar | 2576.1 | 9.37 | 0.9302 |
| 40 | cover | 2735.7 | 0.90 | 0.9878 |
| 40 | optimal | 2769.5 | 2.96 | 1.0000 |
Key formula
Show the full program
# Chapter 5. p52: Markdown rules of thumb against the optimal programme.
# Same market as p51 (ladder 100/80/60/40, Poisson demand with
# lam(p) = 2 exp(2.5 (1 - p/100)), 10 weeks, outlet value 15).
# Rules evaluated exactly by backward recursion:
# never hold full price, dump the rest at the outlet
# calendar 100 for weeks 10-6, 80 for weeks 5-3, 60 for weeks 2-1
# cover one step down whenever stock / (weekly demand * weeks
# left) exceeds 1.5 (weeks-of-cover trigger)
# optimal the dynamic programme of p51
# Output: expected revenue (incl. outlet) and expected units left over.
import math
PRICES = (100.0, 80.0, 60.0, 40.0)
T, NMAX, SALVAGE, K, BASE = 10, 60, 15.0, 2.5, 2.0
def lam(p):
return BASE * math.exp(K * (1.0 - p / 100.0))
def pmf_table(rate, nmax):
out = [math.exp(-rate)]
for d in range(1, nmax + 1):
out.append(out[-1] * rate / d)
return out
PMF = [pmf_table(lam(p), NMAX) for p in PRICES]
def step(v, n, j, money):
pm = PMF[j]
pay = PRICES[j] if money else 0.0
terms = [pm[d] * (pay * d + v[n - d][j]) for d in range(n)]
tail = 1.0 - math.fsum(pm[:n])
terms.append(tail * (pay * n + v[0][j]))
return math.fsum(terms)
def terminal(money):
unit = SALVAGE if money else 1.0
return [[unit * n for _ in PRICES] for n in range(NMAX + 1)]
def solve_optimal():
v = terminal(True)
for t in range(1, T + 1):
new = [[0.0] * len(PRICES) for _ in range(NMAX + 1)]
for n in range(NMAX + 1):
for i in range(len(PRICES)):
vals = [(step(v, n, j, True), j)
for j in range(i, len(PRICES))]
best = max(x for x, _ in vals)
OPT[(t, n, i)] = min(j for x, j in vals
if x >= best - 1e-9)
new[n][i] = best
v = new
def evaluate(rule, money=True):
v = terminal(money)
for t in range(1, T + 1):
new = [[0.0] * len(PRICES) for _ in range(NMAX + 1)]
for n in range(NMAX + 1):
for i in range(len(PRICES)):
new[n][i] = step(v, n, choose(rule, t, n, i), money)
v = new
return v
def choose(rule, t, n, i):
if rule == "optimal":
return OPT[(t, n, i)]
if rule == "never":
return i
if rule == "calendar":
target = 0 if t >= 6 else (1 if t >= 3 else 2)
return max(i, target)
cover = n / (lam(PRICES[i]) * t)
return min(i + 1, len(PRICES) - 1) if cover > 1.5 else i
OPT = {}
solve_optimal()
print("start n rule E[revenue] E[units left] vs optimal")
for n0 in (20, 30, 40):
res = {}
for rule in ("optimal", "never", "calendar", "cover"):
rev = evaluate(rule)[n0][0]
left = evaluate(rule, money=False)[n0][0]
res[rule] = (rev, left)
for rule in ("never", "calendar", "cover", "optimal"):
rev, left = res[rule]
print("{:7d} {:8} {:10.1f} {:13.2f} {:.4f}".format(
n0, rule, rev, left, rev / res["optimal"][0]))Single source and citation
Fan, Y. (2026). Newsvendor Critical Fractiles for Pre-Season Buying, Dirichlet Size-Curve Priors and Dynamic-Programming End-of-Season Markdowns (Version 1.0.0), Chapter 5: A Finite-Horizon Dynamic Programme for End-of-Season Markdowns: When to Cut and by How Much. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-211 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026211,
author = {Fan, Yafu},
title = {Newsvendor Critical Fractiles for Pre-Season Buying, Dirichlet Size-Curve Priors and Dynamic-Programming End-of-Season Markdowns},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Critical Fractile: Cost Ratios, Not Averages, Set the Buy
- Chapter 2 · Skewed Demand, Salvage and Goodwill: Three Forces on the Fractile, and Why Experience Fails to Correct the Bias
- Chapter 3 · Dirichlet-Multinomial Priors for the Size Curve: Weighing Head-Office Experience Against the Store's Own Sample
- Chapter 4 · From the Total to the Sizes: Per-Size Newsvendors, the Fragmentation Premium and Broken Assortments
- Chapter 6 · Folding Markdowns and Reorders Back into the Pre-Season Buy: Effective Salvage and Quick Response
- Chapter 7 · Classical Sources Examined: Bai Gui's "Take What Others Discard" and Cantillon's "Buy at a Certain Price, Sell at an Uncertain One"
- Chapter 8 · Closing the Loop: the Order Quantity Calculator, the Post-Season Bias Review and a Pre-Registered Test