In this paper, properties of the entropic risk measure are examined rigorously in a general framework. This risk measure is then applied in a dynamic portfolio optimization problem, appearing in the risk management constraint. By considering the dual problem, we prove the existence and uniqueness of the solution and obtain an analytic expression for the solution.