This paper is devoted to the study of a stochastic linear-quadratic optimal control problem on infinite horizon where the control variable is constrained and all the coef-ficients of the problem could be random processes. We introduce two extended Riccati equations, both of which are considered in the whole time line. Based on some stabiliz-ability conditions, we prove the existence of a solution for these two equations defined as the limit of suitable finite horizon approximating problems. These results allow us to perform the synthesis of the optimal control. Finally, we apply our results to a pension fund problem. |