FAILURE MAP
← Case archive

FA-84562 / Betting odds conversion / Member archive

Negative Kelly fraction not floored at zero · case 02

A bet without an edge reports a negative fraction or a negative stake.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Kelly staking. With b = price - 1, p = prob and q = 1 - p, the full Kelly fraction is (b * p - q) / b, floored at 0 when the edge is not positive. The stake is bankroll * min(full Kelly * fraction, max_pct / 100), rounded down to a cent. Return [full Kelly fraction rounded half up to four decimals as a string, stake cents].

Why this case matters

Bankroll tools size stakes with fractional Kelly and a hard cap.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
boundary no edge["-1.8000", -20000]["0.0000", 0]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗