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 nruleE[revenue]E[units left]vs optimal
20never1849.01.780.9859
20calendar1761.80.040.9394
20cover1873.80.560.9991
20optimal1875.40.601.0000
30never2147.310.030.9052
30calendar2314.61.840.9758
30cover2357.00.570.9936
30optimal2372.21.381.0000
40never2300.020.000.8305
40calendar2576.19.370.9302
40cover2735.70.900.9878
40optimal2769.52.961.0000

Key formula

\[V_t(n,i) = \max_{j \ge i}\; E\big[p_j \min(D_j, n) + V_{t-1}(n - \min(D_j, n),\, j)\big].\]
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