Dynamic equilibrium with two stocks, heterogeneous investors, and portfolio constraints