  In this paper we establish an abstract, dynamical Thouless-type formula for
affine families of $\mathrm{GL} (2,\mathbb{R})$ cocycles. This result extends
the classical formula relating, via the Hilbert transform, the maximal Lyapunov
exponent and the integrated density of states of a Schr\"odinger operator.
Here, the role of the integrated density of states will be played by a more
geometrical quantity, the fibered rotation number. As an application of this
formula we present limitations on the modulus of continuity of random linear
cocycles. Moreover, we derive H\"older-type continuity properties of the
fibered rotation number for linear cocycles over various base dynamics.
