We study the life cycle of portfolio allocation following for 15 years a large random sample of Norwegian households using error-free data on all components of households' investments drawn from the Tax Registry. Both, participation in the stock market and the portfolio share in stocks, have important life cycle patterns. Participation is limited at all ages but follows a hump-shaped profile which peaks around retirement; the share invested in stocks among the participants is high and flat for the young but investors start reducing it as retirement comes into sight. Our data suggest a double adjustment as people age: a rebalancing of the portfolio away from stocks as they approach retirement, and stock market exit after retirement. Existing calibrated life cycle models can account for the first behavior but not the second. We show that incorporating in these models a reasonable per period participation cost can generate limited participation among the young but not enough exit from the stock market among the elderly. Adding also a small probability of a large loss when investing in stocks, produces a joint pattern of participation and of the risky asset share that resembles the one observed in the data. A structural estimation of the relevant parameters that target simultaneously the portfolio, participation and asset accumulation age profiles of the model reveals that the parameter combination that fits the data best is one with a relatively large risk aversion, small participation cost and a yearly large loss probability in line with the frequency of stock market crashes in Norway.