This paper proposes a theory of intermediation in which intermediaries emerge endogenously as the choice of agents. In contrast to the previous trading models based on random matching or exogenous networks, we allow traders to explicitly choose their trading partners as well as the number of trading links in a dynamic framework. We show that traders with higher trading needs optimally choose to match with traders with lower needs for trade, and they build fewer links in equilibrium. As a result, traders with the least trading need turn out to be the most connected and have the highest gross trade volume. The model therefore endogenously generates a core-periphery trading network that we often observe: a financial architecture that involves ...