Buy High, Cry Later: Beliefs-driven Cycles of Stock Market Participation