5D Library › Shareholder Free-Riding Games, Dynamic Vesting Mechanisms and Defection Early-Warning Models · 中文

Chapter 4. Shapley Values and the Drift of Contributions

What each founder adds

If equity should follow contribution, contribution must be defined. The Shapley value does so for any game in which groups of players can create value: it averages each player’s marginal contribution over every order in which the players could arrive (Shapley 1953). p07 applies it to three founders: one brings the technology, one the sales channel, one the capital and licences. The values each group could create alone are illustrative.

Calculation

# Chapter 4. p07: Shapley value of three founders. A = technology,
# B = sales channel, C = capital and licences. v(S) is the yearly value
# a coalition S could create on its own (illustrative): alone A 2, B 1,
# C 0; AB 8, AC 5, BC 3; ABC 12. The Shapley value averages each
# founder's marginal contribution over all orders of arrival. It is
# compared with an equal split and with a split by capital put in
# (A 10%, B 10%, C 80%).
from itertools import permutations

V = {"": 0, "A": 2, "B": 1, "C": 0, "AB": 8, "AC": 5, "BC": 3, "ABC": 12}

def key(s):
    return "".join(sorted(s))

def shapley(v, players="ABC"):
    out = {p: 0.0 for p in players}
    orders = list(permutations(players))
    for order in orders:
        have = ""
        for p in order:
            out[p] += v[key(have + p)] - v[key(have)]
            have += p
    return {p: x / len(orders) for p, x in out.items()}

if __name__ == "__main__":
    sh = shapley(V)
    total = V["ABC"]
    print("   founder   Shapley   share   equal   by capital")
    for p, cap in zip("ABC", (0.10, 0.10, 0.80)):
        print("   {:7}   {:7.3f}   {:5.3f}   {:5.3f}   {:10.3f}".format(
            p, sh[p], sh[p] / total, 1 / 3, cap))
    core = all(sum(sh[p] for p in s) >= V[key(s)] - 1e-9
               for s in ("A", "B", "C", "AB", "AC", "BC"))
    print("   Shapley split is in the core: {}".format(core))
    print("   AB alone could make {} > A + B under capital split {:.1f}"
          .format(V["AB"], 0.2 * total))
#    founder   Shapley   share   equal   by capital
#    A           5.667   0.472   0.333        0.100
#    B           4.167   0.347   0.333        0.100
#    C           2.167   0.181   0.333        0.800
#    Shapley split is in the core: True
#    AB alone could make 8 > A + B under capital split 2.4

The Shapley value gives the technology founder 5.667 of the 12 units (a share of 0.472), the sales founder 4.167 (0.347) and the capital founder 2.167 (0.181). An equal split gives each 0.333 and a split by capital put in gives the capital founder 0.800. The Shapley split is in the core: no group could do better by leaving. A split by capital is not: the two working founders together could create 8 on their own but would receive only 2.4 of the firm’s value. The capital founder’s money matters, but in this game it is a smaller contribution than the work of the other two, and it can usually be priced as an investment rather than as founder equity.

Watching for drift

Could the same arithmetic serve as an early warning, if a founder quietly withdraws? p08 measures the value of every group each quarter with noise and lets founder C withdraw half of C’s contribution from quarter 5 on, which lowers C’s true share from 0.181 to 0.111.

Calculation

# Chapter 4. p08: Watching contributions drift. Each quarter the value
# of every coalition is measured with noise (each v(S) times a
# lognormal factor, log-sd 0.25). From quarter 5 on, founder C quietly
# withdraws half of C's contribution: every v(S) containing C loses
# 1.5. C's Shapley share is recomputed each quarter; the alarm sounds
# when C's share averaged over the last k quarters falls 0.05 below its
# average in quarters 1 to 4. How long until it sounds, and how often
# it sounds by quarter 12 when nothing has changed? 4,000 runs, seed 93.
import random
from math import exp
from itertools import permutations

BASE = {"A": 2, "B": 1, "C": 0, "AB": 8, "AC": 5, "BC": 3, "ABC": 12}

def shapley_c(v):
    tot = 0.0
    for order in permutations("ABC"):
        have = ""
        for p in order:
            if p == "C":
                k1 = "".join(sorted(have + "C"))
                tot += v[k1] - (v["".join(sorted(have))] if have else 0)
            have += p
    return tot / 6 / v["ABC"]

def quarter(rng, q, change=True):
    v = {}
    for s, x in BASE.items():
        x = x - (1.5 if change and q >= 5 and "C" in s and x >= 1.5
                 else 0)
        v[s] = x * exp(rng.gauss(0, 0.25))
    return shapley_c(v)

def run(rng, k, change=True):
    shares = [quarter(rng, q, change) for q in range(1, 13)]
    base = sum(shares[:4]) / 4
    for q in range(4 + k, 13):
        if sum(shares[q - k:q]) / k < base - 0.05:
            return q, shares
    return None, shares

if __name__ == "__main__":
    rng = random.Random(93)
    print("   true C share: before {:.3f}, after {:.3f}".format(
        shapley_c({s: x for s, x in BASE.items()}),
        shapley_c({s: x - (1.5 if "C" in s and x >= 1.5 else 0)
                   for s, x in BASE.items()})))
    print("   window k   alarm by q8   by q12   median q   false alarm")
    for k in (1, 2, 4):
        qs = [run(rng, k)[0] for _ in range(4000)]
        hit = sorted(q for q in qs if q is not None)
        med = hit[len(hit) // 2] if hit else 0
        fa = sum(1 for _ in range(4000) if run(rng, k, False)[0]) / 4000
        print("   {:8d}   {:11.3f}   {:6.3f}   {:8d}   {:11.3f}".format(
            k, sum(1 for q in qs if q and q <= 8) / 4000,
            len(hit) / 4000, med, fa))
#    true C share: before 0.181, after 0.111
#    window k   alarm by q8   by q12   median q   false alarm
#           1         0.922    0.981          5         0.823
#           2         0.827    0.942          6         0.593
#           4         0.649    0.846          8         0.358

An alarm that compares each quarter with the first four sounds by quarter 8 in 0.922 of the runs in which C really withdrew. But it also sounds by quarter 12 in 0.823 of runs in which nothing changed at all. Averaging over two quarters lowers the false alarms to 0.593 and over four quarters to 0.358, while detection by quarter 8 falls to 0.649. Measured contributions are too noisy to accuse anyone; they are useful for a conversation about the split, not as evidence of bad faith.

C’s measured Shapley share in four runs; the dashed line is the true share before quarter 5, the dotted line after (p08).

Hypothesis · not established

The author’s interpretation (not yet tested): founder teams that set equity by an explicit contribution method such as the Shapley value report fewer disputes over the split later than teams that split equally by default. What would show it wrong: in a pre-registered survey of founder teams, the method used to set the split is unrelated to later disputes once team size and funding are held fixed.

Summary

The Shapley value turns “equity should follow contribution” into a computable split, and in the example it differs sharply from both an equal split and a split by capital. As a monitor of changing contributions, however, it is too noisy: most of its alarms would be false.

References

Shapley, Lloyd S. 1953. “A Value for n-Person Games.” In Contributions to the Theory of Games, Volume II, edited by H. W. Kuhn and A. W. Tucker. Annals of Mathematics Studies 28. Princeton University Press.

Fan, Y. (2026). Shareholder Free-Riding Games, Dynamic Vesting Mechanisms and Defection Early-Warning Models: Moral-Hazard Equity Dilution, Shotgun Buy-Sell Clauses and Behavioral Divergence Signals [股东搭便车博弈、动态股权成熟与背刺早期预警模型] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090243 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).