  We develop sharp large deviation asymptotics for the probability of ruin in a
Markov-dependent stochastic economic environment and study the extremes for
some related Markovian processes which arise in financial and insurance
mathematics, related to perpetuities and the $\operatorname {ARCH}(1)$ and
$\operatorname {GARCH}(1,1)$ time series models. Our results build upon work of
Goldie [Ann. Appl. Probab. 1 (1991) 126--166], who has developed tail
asymptotics applicable for independent sequences of random variables subject to
a random recurrence equation. In contrast, we adopt a general approach based on
the theory of Harris recurrent Markov chains and the associated theory of
nonnegative operators, and meanwhile develop certain recurrence properties for
these operators under a nonstandard "G\"artner--Ellis" assumption on the
driving process.
