When mutual funds are a good substitute for a pension plan