This paper develops a dynamic stochastic general equilibrium model to analyze and derive simple budget rules in the face of volatile public revenue from natural resources in a low-income country like Niger. The simulation results suggest three policy lessons or rules of thumb. When a resource price change is positive and temporary, the best strategy is to save the revenue windfall in a sovereign fund, and use the interest income from the fund to raise citizens' consumption over time. This strategy is preferred to investing in public capital domestically, even when private investment benefits from an enhanced public capital stock. Domestic investment raises the prices of domestic goods, leaving less money for government to transfer to households; public investment is not 100 percent effective in raising output. In the presence of a negative temporary resource price change, however, the best strategy is to cut public investment. This strategy dominates other methods, such as trimming government transfers to households, which reduces consumption directly, or borrowing, which incurs an interest premium as debt rises. In the presence of persistent (positive and negative) shocks, the best strategy is a mix of public investment and saving abroad in a balanced regime that provides a natural insurance against both types of price shocks. The combination of interest income from the sovereign fund, transfers to households, and output growth brought about by public investment provides the best protective mechanism to smooth consumption over time in response to changing resource prices.