Computing rare-event probabilities for affine models and general state space Markov processes