I study the properties of optimal long-term contracts in an environment in which the agent.s type evolves stochastically over time. The model stylizes a buyer-seller relationship but the results apply quite naturally to many contractual situations including regulation and optimal income-taxation. I first show, through a simple example, that distortions need not vanish over time and need not be monotonic in the shock to the buyer's valuation. These results are in contrast to those obtained in the literature that assumes a Markov process with a binary state space. e.g. Battaglini, 2005. I then show that when the sets of possible types in any two adjacent periods satisfy a certain overlapping condition (which is always satis.ed with a continuum of types), then the dynamics of the optimal mechanism can be significantly simplified by assuming the shocks are independent over time. Under certain regularity conditions, the optimal mechanism is then the same irrespective of whether the shocks are the buyer's private information or are observed also by the seller. These conditions are satisfied, for example, in the case of an AR(1) process, a Brownian motion, but also when shocks have a multiplicative effect as it is often the case in financial applications. Furthermore, the distortions in the optimal quantities are independent of the distributions of the shocks and, when the buyer's valuation is additively separable, they are also independent of whether the shocks are transitory or permanent. Finally, I show that assuming the shocks are independent not only greatly simplifies the analysis but is actually without loss of generality with a continuum of types. -- asymmetric information ; stochastic process ; dynamic mechanism design ; long-term contracting