Elections and Macroeconomic Policy Optimization