We consider a financial market with a stock exposed to a counterparty risk
inducing a drop in the price, and which can still be traded after this default
time. We use a default-density modeling approach, and address in this
incomplete market context the expected utility maximization from terminal
wealth. We show how this problem can be suitably decomposed in two optimization
problems in complete market framework: an after-default utility maximization
and a global before-default optimization problem involving the former one.
These two optimization problems are solved explicitly, respectively by duality
and dynamic programming approaches, and provide a fine understanding of the
optimal strategy. We give some numerical results illustrating the impact of
counterparty risk and the loss given default on optimal trading strategies, in
particular with respect to the Merton portfolio selection problem.