What does Bunching at Turnover Thresholds conclude, in numbers, about “Notches and Dominated Ranges: Optimization Frictions and the Marginal Buncher”?

Answer: Chapter 2 turns to notches: with the same elasticity the marginal buncher lies 20.731 units above the threshold, the bin-by-bin estimate is 19.064 and the estimated friction share is 0.274.

Scope of the numbers: Parameters are illustrative and the threshold is always written T; all calculations are generated by the book's programs. The book does statistical analysis and compliance checking only, teaches no way of staying under a threshold, and is general analysis, not individualised tax, legal or financial advice.

中文版

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.274, 19.064, 20.731

excess mass below T, B3399.6
missing mass above T, M3414.0
true bunchers3372
convergence point zU123
friction share a* (dominated)0.274
true non-responding share0.300
naive dz = B / (h0 (1 - a*))15.444
dz by integrating h0 above T19.064
dz from zU - T23.000
true marginal buncher dz*20.731
elasticity, naive dz0.1372
elasticity, integrated dz0.2119
elasticity from zU - T0.3054
structural elasticity0.2500
Show the full program
# Chapter 2. p22: notch estimation, frictions and the elasticity.
# Kleven and Waseem (2013) logic on the data of p21: excess mass B
# below T in [T - 4, T); the upper bound zU of the excluded range is
# the point where the missing mass above T equals B; the friction
# share a* = observed / counterfactual count in the dominated range;
# dz solves B = (1 - a*) * (counterfactual mass in [T, T + dz]), the
# naive dz = B / (h0 (1 - a*)) uses the count per unit just below T.
# The elasticity solves the marginal buncher's
# indifference between T and n (1 - DT) ** e (bisection). Degree-5
# polynomial, hand-written least squares; illustrative parameters.
import math
import random

SEED, N = 20261113, 40000
T, DT, E, RESP, NOISE = 100.0, 0.05, 0.25, 0.7, 1.0
LO, HI, ORDER, XL = 60, 140, 5, 4


def u(z, n, tau, e):
    return (1 - tau) * z - n / (1 + 1 / e) * (z / n) ** (1 + 1 / e)


def draw(rng):
    zs, nb = [], 0
    for _ in range(N):
        n = rng.lognormvariate(math.log(80.0), 0.5)
        if rng.random() >= RESP or n <= T:
            zs.append(n)
            continue
        zi = n * (1 - DT) ** E
        if u(T, n, 0.0, E) >= u(zi, n, DT, E):
            zs.append(T - abs(rng.gauss(0.0, NOISE)))
            nb = nb + 1
        else:
            zs.append(zi)
    return zs, nb


def solve(a, b):
    n = len(b)
    m = [list(a[i]) + [b[i]] for i in range(n)]
    for c in range(n):
        p = max(range(c, n), key=lambda r: abs(m[r][c]))
        m[c], m[p] = m[p], m[c]
        for r in range(c + 1, n):
            f = m[r][c] / m[c][c]
            m[r] = [m[r][k] - f * m[c][k] for k in range(n + 1)]
    x = [0.0] * n
    for r in range(n - 1, -1, -1):
        s = math.fsum(m[r][k] * x[k] for k in range(r + 1, n))
        x[r] = (m[r][n] - s) / m[r][r]
    return x


def polyfit(xs, ys, order):
    q = order + 1
    a = [[math.fsum(x ** (i + j) for x in xs) for j in range(q)]
         for i in range(q)]
    b = [math.fsum(y * x ** i for x, y in zip(xs, ys)) for i in range(q)]
    return solve(a, b)


def notch_fit(c, zu):
    mids = [LO + k + 0.5 for k in range(len(c))]
    xs = [(m - T) / (HI - LO) * 2 for m in mids]
    out = [k for k in range(len(c)) if not T - XL <= mids[k] < zu]
    beta = polyfit([xs[k] for k in out], [c[k] for k in out], ORDER)
    fit = [math.fsum(b * x ** i for i, b in enumerate(beta)) for x in xs]
    big_b = math.fsum(c[k] - fit[k] for k in range(len(c))
                      if T - XL <= mids[k] < T)
    miss = math.fsum(fit[k] - c[k] for k in range(len(c))
                     if T <= mids[k] < zu)
    return big_b, miss, fit, mids


def dz_integral(fit, mids, target):
    ks = [k for k in range(len(fit)) if mids[k] >= T]
    terms = [fit[k] for k in ks]
    for j, k in enumerate(ks):
        acc = math.fsum(terms[:j])
        if acc + fit[k] >= target:
            return mids[k] - 0.5 - T + (target - acc) / fit[k]
    return HI - T


def true_dz():
    lo, hi = T, 3 * T
    for _ in range(200):
        n = (lo + hi) / 2
        if u(T, n, 0.0, E) >= u(n * (1 - DT) ** E, n, DT, E):
            lo = n
        else:
            hi = n
    return lo - T


def e_from_dz(dz):
    nm = T + dz
    lo, hi = 1e-4, 20.0
    for _ in range(200):
        e = (lo + hi) / 2
        g = u(T, nm, 0.0, e) - u(nm * (1 - DT) ** e, nm, DT, e)
        lo, hi = (lo, e) if g > 0 else (e, hi)
    return (lo + hi) / 2


if __name__ == "__main__":
    zs, nb = draw(random.Random(20261113))
    c = [0] * (HI - LO)
    for z in zs:
        k = int(math.floor(z - LO))
        if 0 <= k < len(c):
            c[k] = c[k] + 1
    best = min(range(int(T) + 2, int(T) + 36),
               key=lambda zu: abs(notch_fit(c, zu)[0] - notch_fit(c, zu)[1]))
    big_b, miss, fit, mids = notch_fit(c, best)
    top = T / (1 - DT)
    dom = [k for k in range(len(c)) if T <= mids[k] - 0.5 and
           mids[k] + 0.5 <= top]
    a_star = math.fsum(c[k] for k in dom) / math.fsum(fit[k] for k in dom)
    h0 = math.fsum(fit[k] for k in range(len(c))
                   if T - XL <= mids[k] < T) / XL
    naive = big_b / (h0 * (1 - a_star))
    dz = dz_integral(fit, mids, big_b / (1 - a_star))
    print("excess mass below T, B         {:9.1f}".format(big_b))
    print("missing mass above T, M        {:9.1f}".format(miss))
    print("true bunchers                  {:9d}".format(nb))
    print("convergence point zU           {:9d}".format(best))
    print("friction share a* (dominated)  {:9.3f}".format(a_star))
    print("true non-responding share      {:9.3f}".format(1 - RESP))
    print("naive dz = B / (h0 (1 - a*))   {:9.3f}".format(naive))
    print("dz by integrating h0 above T   {:9.3f}".format(dz))
    print("dz from zU - T                 {:9.3f}".format(best - T))
    print("true marginal buncher dz*      {:9.3f}".format(true_dz()))
    print("elasticity, naive dz           {:9.4f}".format(e_from_dz(naive)))
    print("elasticity, integrated dz      {:9.4f}".format(e_from_dz(dz)))
    print("elasticity from zU - T         {:9.4f}".format(
        e_from_dz(best - T)))
    print("structural elasticity          {:9.4f}".format(E))

Single source and citation

Fan, Y. (2026). Bunching at Tax Thresholds and the Distribution of Turnover: Behavioural Elasticities Revealed by Piling-Up below the Line (Version 1.0.0), Chapter 2: Notches and Dominated Ranges: Optimization Frictions and the Marginal Buncher. 5D Library. DOI pending

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

BibTeX
@book{fan2026319,
  author    = {Fan, Yafu},
  title     = {Bunching at Tax Thresholds and the Distribution of Turnover: Behavioural Elasticities Revealed by Piling-Up below the Line},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book