  We consider in this paper the optimal dividend problem for an insurance
company whose uncontrolled reserve process evolves as a classical
Cram\'{e}r--Lundberg process. The firm has the option of investing part of the
surplus in a Black--Scholes financial market. The objective is to find a
strategy consisting of both investment and dividend payment policies which
maximizes the cumulative expected discounted dividend pay-outs until the time
of bankruptcy. We show that the optimal value function is the smallest
viscosity solution of the associated second-order integro-differential
Hamilton--Jacobi--Bellman equation. We study the regularity of the optimal
value function. We show that the optimal dividend payment strategy has a band
structure. We find a method to construct a candidate solution and obtain a
verification result to check optimality. Finally, we give an example where the
optimal dividend strategy is not barrier and the optimal value function is not
twice continuously differentiable.
