In the optimal stochastic control problem, one estimates, using the utility indifference method, the bond price and the premium of a default swap contract (Credit default swap) when the model parameters (market interest rate, drift coef-ficient, and volatility of risky underlying assets) are random functions of time and state. Namely, the interest rate of the risk-free asset depends on time, and the prices of risky assets are described by linear homogeneous stochastic dif-ferential equations (SDEs) with multiplicative noise. To do this, the authors consider a portfolio with a risk-free asset and a risky asset with no default risk. For each such portfolio, the authors determine the amount of risky assets that maximizes the expected utility of its final wealth. This quantity allows one to solve the parabolic partial differential equations arising from the Hamilton-Jacobi-Bellman (HJB) equation by transforming them into ordinary differential equations using the method of variable separation to obtain the instantaneous value function of each portfolio. The authors derive the bond price and the default swap-contract premium (CDS) rate, which are the amounts that provide the same level of the expected utility by investing all of one’s wealth in a portfolio that does not contain these credit instruments, or by investing these amounts in credit instruments and the remainder of one’s wealth in the portfolio.