We present a model of the optimal level of international reserves for a small open economy seeking insurance against sudden stops in capital flows. We derive a formula for the optimal level of reserves, and show that plausible calibrations can explain reserves of the order of magnitude observed in many emerging market countries. However, the recent build-up of reserves in emerging market Asia seems in excess of what would be implied by an insurance motive against sudden stops.