We develop an algorithm to compute an optimal Q(s,S) policy for the joint replenishment problem when demands follow a compound correlated Poisson process. It is a non-trivial generalization of the work by Nielsen and Larsen [2005. An analytical study of the Q(s,S) policy applied to the joint replenishment problem. European Journal of Operational Research 163, 721–732]. We make some numerical analyses on two-item problems where we compare the optimal Q(s,S) policy to the optimal uncoordinated (s,S) policies. The results indicate that the more negative the correlation the less advantageous the coordination. Therefore, in some cases the degree of correlation determines whether to apply the coordinated Q(s,S) policy or the uncoordinated (s,S) policies.