  This paper is concerned with a stochastic linear-quadratic optimal control
problem in a finite time horizon, where the coefficients of the control system
are allowed to be random, and the weighting matrices in the cost functional are
allowed to be random and indefinite. It is shown, with a Hilbert space
approach, that for the existence of an open-loop optimal control, the convexity
of the cost functional (with respect to the control) is necessary; and the
uniform convexity, which is slightly stronger, turns out to be sufficient,
which also leads to the unique solvability of the associated stochastic Riccati
equation. Further, it is shown that the open-loop optimal control admits a
closed-loop representation. In addition, some sufficient conditions are
obtained for the uniform convexity of the cost functional, which are strictly
general than the classical conditions that the weighting matrix-valued
processes are positive (semi-)definite.
