  In this paper a method based on a Markov chain Monte Carlo (MCMC) algorithm
is proposed to compute the probability of a rare event. The conditional
distribution of the underlying process given that the rare event occurs has the
probability of the rare event as its normalizing constant. Using the MCMC
methodology a Markov chain is simulated, with that conditional distribution as
its invariant distribution, and information about the normalizing constant is
extracted from its trajectory. The algorithm is described in full generality
and applied to the problem of computing the probability that a heavy-tailed
random walk exceeds a high threshold. An unbiased estimator of the reciprocal
probability is constructed whose normalized variance vanishes asymptotically.
The algorithm is extended to random sums and its performance is illustrated
numerically and compared to existing importance sampling algorithms.
