What does Weekly Quotas for Business Lines conclude, in numbers, about “Two Frictions: Switching Costs Call for a Hysteresis Band, Changing Markets Call for Fading Records”?

Answer: With switching costs the Gittins index loses its optimality, and a hysteresis band is a simple, effective patch: the higher the cost, the wider the best band, about three to five tenths of the cost in the illustrative model. When markets change, old records must fade: with γ at 0.97 both Thompson sampling and the greedy rule rise from a little over seven tenths of the ideal to nearly nine tenths. So far, though, the "sale" in these rules is still an abstract unit. A sale on the tollbooth, the buying and the publishing lines differs greatly in value, and so does the cost of a unit; how should the index be converted into money?

Scope of the numbers: Parameters are illustrative, and margins and costs are accounting points, not prices; all calculations are generated by the book's programs. It is not individual business advice, and changes to budgets or live systems need sign-off by the person in charge.

中文版

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.97

restless lines: rate redrawn w.p. 0.01 per period, T = 2000
rulegamma share-oracle
greedy1.000.7160
thompson1.000.7699
thompson0.990.8707
thompson0.970.8829
thompson0.900.8461
greedy0.970.8849
Show the full program
# Chapter 5. p52: when idle lines keep changing, memory must fade.
# Model: 3 Bernoulli lines; each period, each line's rate is redrawn
# from Uniform(0, 1) with probability 0.01 (a market shift that happens
# whether or not the line is funded: a restless line, Whittle 1988).
# One unit per period, 2000 periods, 100 runs, no discounting.
# Rules: greedy and Thompson on full memory, and Thompson with
# forgetting gamma: every period all pseudo-counts are multiplied by
# gamma, so old evidence fades and an idle line's uncertainty regrows.
# Score = mean successes per period / oracle (who knows current rates).
import math
import random

N, T, RUNS, SHIFT = 3, 2000, 100, 0.01


def run(rule, gamma, world_seed, rng):
    world = random.Random(world_seed)
    p = [world.random() for _ in range(N)]
    s, f = [0.0] * N, [0.0] * N
    hits, best = 0, []
    for _ in range(T):
        for i in range(N):
            if world.random() < SHIFT:
                p[i] = world.random()
        if rule == "greedy":
            sc = [(1 + s[i]) / (2 + s[i] + f[i]) for i in range(N)]
        else:
            sc = [rng.betavariate(1 + s[i], 1 + f[i]) for i in range(N)]
        i = max(range(N), key=lambda j: (sc[j], -j))
        hit = world.random() < p[i]
        best.append(max(p))
        for j in range(N):
            s[j] *= gamma
            f[j] *= gamma
        if hit:
            s[i] += 1
            hits += 1
        else:
            f[i] += 1
    return hits / math.fsum(best)


print("restless lines: rate redrawn w.p. %.2f per period, T = %d"
      % (SHIFT, T))
print("%-10s %6s %12s" % ("rule", "gamma", "share-oracle"))
for rule, gamma in (("greedy", 1.0), ("thompson", 1.0),
                    ("thompson", 0.99), ("thompson", 0.97),
                    ("thompson", 0.9), ("greedy", 0.97)):
    rng = random.Random(5)
    sc = [run(rule, gamma, 1000 + k, rng) for k in range(RUNS)]
    print("%-10s %6.2f %12.4f" % (rule, gamma, math.fsum(sc) / RUNS))

Single source and citation

Fan, Y. (2026). Dynamic Allocation of Compute and Budget across Business Lines: Gittins-Index Exploration and Weekly Quotas for Tollbooth, Buying and Publishing Lines (Version 1.0.0), Chapter 5: Two Frictions: Switching Costs Call for a Hysteresis Band, Changing Markets Call for Fading Records. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-264 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026264,
  author    = {Fan, Yafu},
  title     = {Dynamic Allocation of Compute and Budget across Business Lines: Gittins-Index Exploration and Weekly Quotas for Tollbooth, Buying and Publishing Lines},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book