We present a method for using rational expectations in alinear-quadratic optimization framework. Following the approach put forward by Sims, we solve the model through a QZ decomposition, which is generally easier to implement than the more widely used Blanchard-Kahn method.