Viability and Equilibrium in Securities Markets with Frictions