How has the microcredit movement managed to push financial frontiers? In a context in which borrowers vary in unobservable risk, Ghatak (1999, 2000) shows that group-based, joint liability contracts price for risk more accurately than individual contracts, provided that borrowers match homogeneously by risk-type. This more accurate risk-pricing can attract safe borrowers and rouse an otherwise dormant credit market. We extend the theory to include correlated risk, and show that borrowers will anti-diversify risk within groups, in order to lower chances of facing liability for group members. We directly test risk-matching and intra-group diversification of risk using data on Thai microcredit borrowing groups. We propose a non-parametric univariate methodology for assessing homogeneity of matching; structural multivariate analysis is carried out using Fox's (2008) matching maximum score estimator. We find evidence of a) homogeneous sorting by risk and b) risk anti-diversification within groups, though not along occupational lines. Thus there is evidence that group lending improves risk-pricing in this context and is part of the explanation of the rise in financial intermediation among the poor. However, the anti-diversification results reveal a potentially negative aspect of voluntary group formation and point to limitations of microcredit groups as risk-sharing mechanisms.