We build a model in which financial intermediaries provide insurance to households against a liquidity shock. Households can also invest directly on a financial market if they pay a cost. In equilibrium, the ability of intermediaries to share risk is constrained by the market. This can be...