  We show how to solve Merton optimal investment stochastic control problem for
Hawkes-based models in finance and insurance, i.e., for a wealth portfolio X(t)
consisting of a bond and a stock price described by general compound Hawkes
process (GCHP), and for a capital R(t) of an insurance company with the amount
of claims described by the risk model based on GCHP. The novelty of the results
consists of the new Hawkes-based models and in the new optimal investment
results in finance and insurance for those models.
