A mathematical dynamic portfolio model with uncertainty is discussed by use of value-at-risks. The risk criterion is composed by the sum of unexpected shortterm risks which occur suddenly in each period. By dynamic programming approach, we derive an optimality condition for the optimal value-at-risk portfolio in a stochastic decision process. It is shown that the optimal value-at-risk is a solution of the optimality equation under a reasonable assumption, and an optimal trading strategy is obtained from the equation. A numerical example is given to illustrate our idea.