We deal with the optimal portfolio problem in discrete-time setting. Employing the discrete It\^o formula, which is developed by Fujita, we establish the discrete Hamilton-Jacobi-Bellman (d-HJB) equation for the value function. Simple examples of the d-HJB equation are also discussed.