Abstract-This work describes a procedure that determines the optimal allocation for the yearly energy resulting from random water inflows to the different subperiods of a year so that the expected benefits are maximized. Its main idea is to distribute the energy stored in reservoirs in each period into two parts: one is directly sold in the energy market, while the other is made available to cover any unplanned outages of thermal units. The method proposed fulfills two objectives, to distribute the hydro energy optimally according to economic criteria and to assess the impact of new market rules on the reliability of an electric system. The procedure will be illustrated by an example based on the Spanish generating system. Index Terms-EENS, LOLE, loss of energy, loss of load, reserves allocation, planning.