  In many experimental situations, a physical system undergoes stochastic
evolution which may be described via random maps between two compact spaces. In
the current work, we study the applicability of large deviations theory to
time-averaged quantities which describe such stochastic maps, in particular
time-averaged currents and density functionals. We derive the large deviations
principle for these quantities, as well as for global topological currents, and
formulate variational, thermodynamic relations to establish large deviation
properties of the topological currents. We illustrate the theory with a
nontrivial example of a Heisenberg spin-chain with a topological driving of the
Wess-Zumino type. The Cram\'er functional of the topological current is found
explicitly in the instanton gas regime for the spin-chain model in the
weak-noise limit. In the context of the Morse theory, we discuss a general
reduction of continuous stochastic models with weak noise to effective Markov
chains describing transitions between stable fixed points.
