This paper studies the optimal design and operation of new energy equipment including renewable energy sources for prosumer industries. In order to augment the interest of industries in performing energy actions, the economic parameters of the investment are analysed and the risk related to it considering the uncertainty in energy markets is evaluated. A two-stage optimization approach is proposed considering the whole lifetime of the energy equipment and an uncertainty analysis performed through the evaluation of the deterministic model under Latin Hypercube Samples of uncertain parameters. A case study based on a real industry is presented, whose results expose the robustness of the optimization methodology and the acceptable risk of investing in renewable energy sources and energy equipment for prosumer purposes.