  We study the existence theory for parabolic variational inequalities in
weighted $L^2$ spaces with respect to excessive measures associated with a
transition semigroup. We characterize the value function of optimal stopping
problems for finite and infinite dimensional diffusions as a generalized
solution of such a variational inequality. The weighted $L^2$ setting allows us
to cover some singular cases, such as optimal stopping for stochastic equations
with degenerate diffusion coefficient. As an application of the theory, we
consider the pricing of American-style contingent claims. Among others, we
treat the cases of assets with stochastic volatility and with path-dependent
payoffs.
