We present a heuristic that suggests that ranks of elliptic curves E over Q are bounded. In fact, it suggests that there are only finitely many E of rank greater than 21. Our heuristic is based on modeling the ranks and Shafarevich-Tate groups of elliptic curves simultaneously, and relies on a theorem counting alternating integer matrices of specified rank. We also discuss analogues for elliptic curves over other global fields.Our model is inspired in part by the Cohen-Lenstra heuristics for class groups [CL84], as reinterpreted by Friedman and Washington [FW89]. These heuristics predict that for a fixed odd prime p, the distribution of the p-primary part of the class group of a varying imaginary quadratic field is equal to the limit as n → ∞ of the distribution of the cokernel of the homomorphism Z n p A → Z n p given by a random matrix A ∈ M n (Z p ); see Section 4 for the precise conjecture. In analogy, and in agreement with conjectures of Delaunay [Del01, Del07, DJ14], Bhargava, Kane, Lenstra, Poonen, and Rains [BKLPR15] predicted that for a fixed prime p and r ∈ Z ≥0 , the distribution of the p-primary part of the Shafarevich-Tate group X(E) as E varies over rank r elliptic curves over Q ordered by height equals the limit as n → ∞ (through integers of the same parity as r) of the distribution of coker A for a random alternating matrix A ∈ M n (Z p ) subject to the condition rk Zp (ker A) = r; see Section 5 for the precise conjecture and the evidence for it.If imposing the condition rk Zp (ker A) = r yields a distribution conjecturally associated to the curves of rank r, then naturally we guess that if we choose A at random from the space M n (Z p ) alt of all alternating matrices without imposing such a condition, then the distribution of rk Zp (ker A) tends as n → ∞ to the distribution of the rank of an elliptic curve. This cannot be quite right, however: since an alternating matrix always has even rank, the parity of n dictates the parity of rk Zp (ker A). But if we choose n uniformly at random from {⌈η⌉, ⌈η⌉ + 1} (with η → ∞), then we find that rk Zp (ker A) equals 0 or 1 with probability 50% each, and rk Zp (ker A) ≥ 2 with probability 0%; for example, when n is even, we have rk Zp (ker A) = 0 unless det A = 0, and det A = 0 holds only when A lies on a (measure 0) hypersurface in the space M n (Z p ) alt of all alternating matrices. This 50%-50%-0% conclusion matches the elliptic curve rank behavior conjectured for quadratic twist families by Goldfeld [Gol79, Conjecture B] and Katz and Sarnak [KS99a, KS99b].So far, however, this model does not predict anything about the number of curves of each rank ≥ 2 except to say that asymptotically they should amount to 0% of curves. Instead of sampling from M n (Z p ), we could sample from the set M n (Z) alt,≤X of alternating integer matrices whose entries have absolute values bounded by X, and studybut this again would be 0 for each r ≥ 2. To obtain finer information, instead of taking the limit as X → ∞, we let X depend on the height H of the elliptic curve bein...