We study the determinants of political myopia in a rational model of electoral accountability where political ability is ex-ante unknown and policy choices are not perfectly observable. On the one hand, elections improve accountability and allow to keep well-performing incumbents. On the other, politicians invest too little in costly policies with future returns in an attempt to signal high ability and increase their reelection probability. Contrary to the conventional wisdom, uncertainty reduces political myopia and may, under some conditions, increase social welfare. We use the model to study how political rewards can be set so as to maximize social welfare and the desirability of imposing a one-term limit to governments. The predictions of our theory are consistent with a number of stylized facts and with a new empirical observation documented in this paper: aggregate uncertainty, measured by economic volatility, is associated to better fiscal discipline in a panel of 20 OECD countries.