  For controlled discrete-time stochastic processes we introduce a new class of
dynamic risk measures, which we call process-based. Their main features are
that they measure risk of processes that are functions of the history of a base
process. We introduce a new concept of conditional stochastic time consistency
and we derive the structure of process-based risk measures enjoying this
property. We show that they can be equivalently represented by a collection of
static law-invariant risk measures on the space of functions of the state of
the base process. We apply this result to controlled Markov processes and we
derive dynamic programming equations.
