  The paper develops a general methodology for analyzing policies with
path-dependency (hysteresis) in stochastic models with forward looking
optimizing agents. Our main application is a macro-climate model with a
path-dependent climate externality. We derive in closed form the dynamics of
the optimal Pigouvian tax, that is, its drift and diffusion coefficients. The
dynamics of the present marginal damages is given by the recently developed
functional It\^o formula. The dynamics of the conditional expectation process
of the future marginal damages is given by a new total derivative formula that
we prove. The total derivative formula represents the evolution of the
conditional expectation process as a sum of the expected dynamics of hysteresis
with respect to time, a form of a time derivative, and the expected dynamics of
hysteresis with the shocks to the trajectory of the stochastic process, a form
of a stochastic derivative. We then generalize the results. First, we propose a
general class of hysteresis functionals that permits significant tractability.
Second, we characterize in closed form the dynamics of the stochastic
hysteresis elasticity that represents the change in the whole optimal policy
process with an introduction of small hysteresis effects. Third, we determine
the optimal policy process.
