A very common technique when looking at general stochastic processes is to break them down into separate martingale and drift terms. This is easiest to describe in the discrete time situation. So, suppose that is a stochastic process adapted to the discretetime filtered probability space . If X is integrable, then it is possible to decompose it into the sum of a martingale M and a process A, starting from zero, and such that is measurable for each . That is, A is a predictable process. The martingale condition on M enforces the identity
So, A is uniquely defined by

(1) 
and is referred to as the compensator of X. This is just the predictable term in the Doob decomposition described at the start of the previous post.
In continuous time, where we work with respect to a complete filtered probability space , the situation is much more complicated. There is no simple explicit formula such as (1) for the compensator of a process. Instead, it is defined as follows.
Definition 1 The compensator of a cadlag adapted process X is a predictable FV process A, with , such that is a local martingale.
For an arbitrary process, there is no guarantee that a compensator exists. From the previous post, however, we know exactly when it does. The processes for which a compensator exists are precisely the special semimartingales or, equivalently, the locally integrable semimartingales. Furthermore, if it exists, then the compensator is uniquely defined up to evanescence. Definition 1 is considerably different from equation (1) describing the discretetime case. However, we will show that, at least for processes with integrable variation, the continuoustime definition does follow from the limit of discrete time compensators calculated along ever finer partitions (see below).
Although we know that compensators exist for all locally integrable semimartingales, the notion is often defined and used specifically for the case of adapted processes with locally integrable variation or, even, just integrable increasing processes. As with all FV processes, these are semimartingales, with stochastic integration for locally bounded integrands coinciding with LebesgueStieltjes integration along the sample paths. As an example, consider a homogeneous Poisson process X with rate . The compensated Poisson process is a martingale. So, X has compensator .
We start by describing the jumps of the compensator, which can be done simply in terms of the jumps of the original process. Recall that the set of jump times of a cadlag process are contained in the graphs of a sequence of stopping times, each of which is either predictable or totally inaccessible. We, therefore, only need to calculate separately for the cases where is a predictable stopping time and when it is totally inaccessible.
For the remainder of this post, it is assumed that the underlying filtered probability space is complete. Whenever we refer to the compensator of a process X, it will be understood that X is a special semimartingale. Also, the jump of a process is defined to be zero at time .
Lemma 2 Let A be the compensator of a process X. Then, for a stopping time ,
 if is totally inaccessible.
 if is predictable.
(more…)