Taxation and risk taking in a capital market equilibrium with self-selection