We develop an asset pricing model with rich heterogeneity in asset demand across investors, designed to match institutional holdings. The equilibrium price vector is uniquely determined by market clearing for each asset. We relate our model to traditional frameworks including Euler equations, mean-variance portfolio choice, factor models, and cross-sectional regressions on characteristics. We propose two identification strategies for the asset demand system, based on a coefficient restriction or instrumental variables, which produce similar estimates that are different from the least squares estimates. We apply our model to understand the role of institutions in stock market movements, liquidity, volatility, and predictability.