In the data envelopment analysis (DEA) literature, productivity change captured by the Malmquist productivity index, especially in terms of a deterministic environment and stochastic variability in inputs and outputs, has been somewhat ignored. Therefore, this study developed a firm-specific, DEA-based Malmquist index model to examine the efficiency and productivity change of banks in a stochastic environment. First, in order to estimate bank-specific efficiency, we employed a two-stage double bootstrap DEA procedure. Specifically, in the first stage, the technical efficiency scores of banks were calculated by the classic DEA model, while in the second stage, the double bootstrap DEA model was applied to determine the effect of the contextual variables on bank efficiency. Second, we applied a two-stage procedure for measuring productivity change in which the first stage included the estimation of stochastic technical efficiency and the second stage included the regression of the estimated efficiency scores on a set of explanatory variables that influence relative performance. Finally, an empirical investigation of the Iranian banking sector, consisting of 120 bank-year observations of 15 banks from 2014 to 2021, was performed to measure their efficiency and productivity change. Based on the findings, the explanatory variables (i.e., the nonperforming loan ratio and the number of branches) indicated an inverse relationship with stochastic technical efficiency and productivity change. The implication of the findings is that, in order to improve the efficiency and productivity of banks, it is important to optimize these factors.