This paper shows how to introduce liquidity into the well known mean-variance framework of portfolio selection. Either by estimating mean-variance liquidity constrained frontiers or directly estimating optimal portfolios for alternative levels of risk aversion and preference for liquidity, we obtain strong effects of liquidity on optimal portfolio selection. In particular, portfolio performance, measured by the Sharpe ratio relative to the tangency portfolio, varies significantly with liquidity. Moreover, although mean-variance performance becomes clearly worse, the levels of liquidity on optimal portfolios obtained when there is a positive preference for liquidity are much lower than on those optimal portfolios where investors show no sign...