Marginal structural models were introduced in order to provide estimates of causal effects from interventions based on observational studies in epidemiological research. We present a variant of the marginal structural strategy in continuous time using martingale theory and marked point processes. This offers a mathematical interpretation of marginal structural models that has not been available before. Our approach starts with a characterization of reasonable models of randomized trials in terms of local independence. Such a model gives a martingale measure that is equivalent to the observational measure. The continuous time likelihood ratio process with respect to these two probability measures corresponds to the weights in a discrete time marginal structural model. In order to do inference for the new measure, we can simulate sampling using the observed data weighted by this likelihood ratio.