Capital formation and demographics