Within a rational general equilibrium model in which agents care only about personal consumption, we consider a setting in which, due to borrowing constraints, individuals endowed with local resources underparticipate in financial markets. As a result, investors compete for local resources through their portfolio choices. Even with complete financial markets and no aggregate risk, agents may herd into risky portfolios. This yields a Pareto-dominated outcome as agents introduce “community” risk unrelated to fundamentals. Moreover, if some agents are behaviorally biased, or cannot completely diversify their holdings, rational agents may choose more extreme portfolios and amplify the effect.