The maximal return and optimal leverage of a constant proportion debt obligation with finite termination and two boundaries are analysed by numerically solving Hamilton–Jacobi–Bellman equations. We discuss the probabilities of the asset value reaching the upper or lower bound under the optimal control and the optimal control problem with a time-varying boundary. Furthermore, we also analyse the relationship between the optimal return, the optimal policy and different parameters.