An optimal investment problem is considered for a continuous-time market consisting of the usual bank account, a rolling horizon bond, and a discount bond whose maturity coincides with the planning horizon. Two economic factors, namely, the short rate and the risk-free yield of some fixed maturity, are modeled as Gaussian processes. For the problem of maximizing expected CRRA utility of terminal wealth, the optimal portfolio is obtained through a Bellman equation. The results are noteworthy because the discount bond, which is the riskless asset for the investor, causes a degeneracy due to its zero volatility at the planning horizon. Indeed, this delicate matter is treated rigorously for what seems to be the first time, and it is shown that there exists an optimal, admissible (but unbounded) trading strategy.