We consider an incomplete markets economy with capital accumulation and endogenous labor supply. Individuals face countercyclical idiosyncratic labor and asset risk. We derive conditions under which the aggregate allocations and price system can be found by solving a representative agent problem. This result is applied to analyze the properties of an optimal monetary policy in a New Keynesian economy with uninsured countercyclical individual risk. The optimal monetary policy that emerges from our incomplete markets economy is the same as the optimal monetary policy in a representative agent model with preference shocks. When price rigidity is the only friction the optimal monetary policy calls for stabilizing the inflation rate at zero.