  In this paper we continue investigating the optimal dividend and investment
problems under the Sparre Andersen model. More precisely, we assume that the
claim frequency is a renewal process instead of a standard compound Poisson
process, whence semi-Markovian. Building on our previous work \cite{BaiMa17},
where we established the dynamic programming principle via a {\it backward
Markovization} procedure and proved that the value function is the unique {\it
constrained} viscosity solution of the HJB equation, in this paper we focus on
the construction of the optimal strategy. The main difficulties in this effort
is two fold: the regularity of the viscosity solution to a non-local,
nonlinear, and degenerate parabolic PDE on an unbounded domain, which seems to
be new in its own right; and the well-posedness of the closed-loop stochastic
system. By introducing an auxiliary PDE, we construct an $\e$-optimal strategy,
and prove the well-posedness of the corresponding closed-loop system, via a
"bootstrap" technique with the help of a Krylov estimate.
