  In this paper we discuss the optimal liquidation over a finite time horizon
until the exit time. The drift and diffusion terms of the asset price are
general functions depending on all variables including control and market
regime. There is also a local nonlinear transaction cost associated to the
liquidation. The model deals with both the permanent impact and the temporary
impact in a regime switching framework. The problem can be solved with the
dynamic programming principle. The optimal value function is the unique
continuous viscosity solution to the HJB equation and can be computed with the
finite difference method.
