It has been suggested that countries whose exports are in especially risky sectors will experience higher output volatility. This paper develops a measure of the riskiness of a country's pattern of export specialization, and illustrates its features across countries and over time. The exercise reveals large cross-country differences in the risk content of exports. This measure is strongly correlated with the volatility of terms-of-trade, total exports, and output, but does not exhibit a close relationship to the level of income, overall trade openness, or other country characteristics. We then propose an explanation for what determines the risk content of exports, based on the theoretical literature exemplified by Turnovsky (1974). Countries with a comparative advantage in safe sectors or a strong enough comparative advantage in risky sectors will specialize, whereas countries whose comparative advantage in risky sectors is not too strong will diversify their export structure to insure against export income risk. We use both non-parametric and semiparametric techniques to demonstrate that these theoretical predictions are strongly supported by the data.