This paper employs a recent statistical algorithm (CRAGGING) in order to build an early warning model for banking crises in emerging markets. We perturb our data set many times and create "artificial" samples from which we estimated our model, so that, by construction, it is flexible enough to be applied to new data for out-of-sample prediction. We find that, out of a large number (540) of candidate explanatory variables, from macroeconomic to balance sheet indicators of the countries' financial sector, we can accurately predict banking crises by just a handful of variables. Using data over the period from 1980 to 2010, the model identifies two basic types of banking crises in emerging markets: a "Latin American type", resulting from the combination of a (past) credit boom, a flight from domestic assets, and high levels of interest rates on deposits; and an "Asian type", which is characterized by an investment boom financed by banks' foreign debt. We compare our model to other models obtained using more traditional techniques, a Stepwise Logit, a Classification Tree, and an "Average" model, and we find that our model strongly dominates the others in terms of out-of-sample predictive power.