This paper aims to show how certain known martingales for epidemic models may be derived using general techniques from the theory of stochastic integration, and hence to extend the allowable infection and removal rate functions of the model as far as possible. Denoting by x, y the numbers of susceptible and infective individuals in the population, then we assume that new infections occur at rate βxyxy and infectives are removed at rate γxyy, where the ratio βxy / γxy can be written in the form q(x+y) / xp(x) for appropriate functions p,q. Under this condition, we find equations giving the distribution of the number of susceptibles remaining in the population at appropriately defined stopping times. Using results on Abel–Gontcharoff pseudopolynomials we also derive an expression for the expectation of any function of the number of susceptibles at these times, as well as considering certain integrals over the course of the epidemic. Finally, some simple examples are given to illustrate our results.