This paper deals with the estimation of market power, measured by the Lerner index, and cost efficiency at the bank level, using the stochastic frontier (SF) methodology. Both market power and cost efficiency are estimated jointly in a single step. We use the copula method to incorporate dependence between market power and cost efficiency. In contrast to earlier works that used a two-step approach, the SF approach used herein estimates a bank-specific nonnegative Lerner index free from random shocks. We showcase the advantages of our proposed methodology in terms of an empirical study on the banking sectors of five former communist countries during the period 2000-2008. Compared to the conventional approach, our model gives higher mean values of the Lerner index and smaller standard deviations. Further, we find a significant positive relationship between cost efficiency and market power of banks, thereby rejecting the "quiet life hypothesis.".