In this paper, the effect of renewable energy resources (RERs), demand response (DR) programs and electric vehicles (EVs) is evaluated on the optimal operation of a smart distribution company (SDISCO) in the form of a new bi-level model. According to the existence of private electric vehicle parking lots (PLs) in the network, the aim of both levels is to maximize the profits of SDISCO and the PL owners. Furthermore, due to the uncertainty of RERs and EVs, the conditional value-at-risk (CVaR) method is applied in order to limit the risk of expected profit. The model is transformed into a linear single-level model by the Karush–Kuhn–Tucker (KKT) conditions and tested on the IEEE 33-bus distribution system over a 24-h period. The results show that by using a proper charging/discharging schedule, as well as a time of use program, SDISCO gains more profit. Furthermore, by increasing the risk aversion parameter, this profit is reduced