  We study a finite-dimensional continuous-time optimal control problem on
finite horizon for a controlled diffusion driven by Brownian motion, in the
linear-quadratic case. We admit stochastic coefficients, possibly depending on
an underlying independent marked point process, so that our model is general
enough to include controlled switching systems where the switching mechanism is
not required to be Markovian. The problem is solved by means of a Riccati
equation, which a backward stochastic differential equation driven by the
Bronwian motion and by the random measure associated to the marked point
process.
