Analysts and economists have long studied how demographics drive markets. When, for example, the generation of people born in the baby boom following World War II entered the workforce it increased the supply of labour, which boosted economic output. This, in turn, drove up consumption and savings.
Much of the money that they squirrelled away was invested (directly or indirectly) in equities and property. Prices rose.