In this paper we construct a rational expectations model based on a Phillips curve that embodies persistence in inflation. As we assume that the central bank targets the natural rate of output, there is no inflation bias. We derive optimal monetary policy rules that are state-contingent and shock-dependent both in the case where the central bank follows a commitment strategy and where it pursues a discretionary procedure. Numerical solutions show that in the state-contingent part there always exists a tradeoff between these two optimal rules in that the commitment rule involves smaller expected deviations of inflation from its target but larger expected deviations of output from its target; in the shock-dependent part there can be situations in which the discretionary rule is more effective in reducing the impact of the random shock on inflation and less effective in reducing the random shock on output. Only in the latter case it is possible that one rule is superior; otherwise it is generally the case that a tradeoff exists between these two rules.