Our objective is to study the optimal design of a public pension system, taking into account the long-run risks that households face. Our project should make four contributions. First, we will identify empirically the long-run risks that are most important for life-cycle savings decisions and for pension design, with a focus on European data. Second, we develop a model of overlapping generations that allows to study the effect of this risk on the working of the pension system, and on the intergenerational distribution of consumption. Third, we study the optimal design of a pension system in such an environment, analyzing some of the reforms of the social security system that have been proposed in Europe and in North America. Fourth, we adapt this model to account for the specificities of the Austrian pension system, to study how the theoretical improvements can be implemented in a realistic setting.