This paper presents a novel framework for cooperative trading in a price-maker wind power producer, that participates in the short-term electricity balance markets. In this framework, market price uncertainty is first modeled using a price uncertainty predictor, consisting of ridge regression (RR), nonpooling convolutional neural network (NPCNN), and linear quantile regression (LQR). RR is employed to select the correlated features to the corresponding forecast day, NPCNN is employed to extract the nonlinear features, and LQR is employed to estimate the price uncertainty. Then, an improved firefly algorithm (IFA) is proposed to solve the optimization problem. IFA uses the adaptive moment estimation method to improve the convergence speed and search for the global solution. Finally, the Shapley value is employed for the profit distribution of cooperative power producers. Illustrative examples show the effectiveness of the proposed framework and optimization model