By using their financial reserves efficiently, pension funds can smooth shocks on asset returns, and can thus facilitate intergenerational risk-sharing. In addition to the primary benefit of improved time diversification, this form of risk allocation affords the additional benefit of allowing these funds to take better advantage of the equity premium, which also favors the consumers. In this paper, our aim is twofold. First, we characterize the socially efficient policy rules of a collective pension plan in terms of portfolio management, capital payments to retirees, and dividend payments to shareholders. We examine both the first-best rules and the second-best rules, where, in the latter case, the fund is constrained by a solvency ratio and by a guaranteed minimum return to workers' contributions. Second, we measure the social surplus of the system compared to a situation in which each generation would save and invest in isolation for its own retirement. One of the main results of the paper is that better intergenerational risk-sharing does not reduce the risk born by each generation. Rather, it increases the expected return to the workers' contributions.