  Tontines were once a popular type of mortality-linked investment pool. They
promised enormous rewards to the last survivors at the expense of those died
early. And, while this design appealed to the gambling instinc}, it is a
suboptimal way to generate retirement income. Indeed, actuarially-fair life
annuities making constant payments -- where the insurance company is exposed to
longevity risk -- induce greater lifetime utility. However, tontines do not
have to be structured the historical way, i.e. with a constant cash flow shared
amongst a shrinking group of survivors. Moreover, insurance companies do not
sell actuarially-fair life annuities, in part due to aggregate longevity risk.
  We derive the tontine structure that maximizes lifetime utility. Technically
speaking we solve the Euler-Lagrange equation and examine its sensitivity to
(i.) the size of the tontine pool $n$, and (ii.) individual longevity risk
aversion $\gamma$. We examine how the optimal tontine varies with $\gamma$ and
$n$, and prove some qualitative theorems about the optimal payout.
Interestingly, Lorenzo de Tonti's original structure is optimal in the limit as
longevity risk aversion $\gamma \to \infty$. We define the natural tontine as
the function for which the payout declines in exact proportion to the survival
probabilities, which we show is near-optimal for all $\gamma$ and $n$. We
conclude by comparing the utility of optimal tontines to the utility of loaded
life annuities under reasonable demographic and economic conditions and find
that the life annuity's advantage over the optimal tontine is minimal.
  In sum, this paper's contribution is to (i.) rekindle a discussion about a
retirement income product that has been long neglected, and (ii.) leverage
economic theory as well as tools from mathematical finance to design the next
generation of tontine annuities.
