This paper shows that the optimal executive compensation scheme in a dynamic moral hazard environment is convex in the firm value. This implies that the optimal contract should include stock options. This is because the private benefit of shirking is increasing in firm value and the manager's utility is concave. Therefore, in contrast to the previous literature that takes stock options in the incentive contract exogenously, we rationalize the optimality of their use endogenously. Moreover, we show that the optimal amount of stock options (restricted stocks) increases with agency cost and the executive's reservation utility, decreases with the degree of risk aversion of the manager, and increases (decreases) with the firm size.