We study optimal monetary and fiscal policy in a model with heterogeneous agents, incomplete markets, and nominal rigidities. We develop numerical techniques to approximate Ramsey plans and apply them to a calibrated economy to compute optimal responses of nominal interest rates and labor tax...