Community Energy Markets (CEMs) enable trading opportunities between participants in a community to achieve savings and profits. However, the market design and the behaviour of participants are key factors that determine the success of such markets. To this end, this research presents a CEM model and conducts agent-based simulations to study the benefits of the CEM to consumers and prosumers. The proposed market structure is an hour-ahead periodic double auction. In particular, market rules are proposed that incentivise the provision of energy supply to the community and the investment in energy storage. Furthermore, a trading strategy is introduced that leverages energy flexibility created by the storage devices. Finally, as well as the hour-ahead market, we include a minute-by-minute balancing as part of the CEM’s energy exchange mechanism. The balancing approach is introduced to account for a community budget deficit caused by the time difference between supply and demand. The proposed market results in cost savings for consumers and profit for prosumers similar to existing approaches, while increasing the energy suppliers’ percentage of financial benefits from 50% to a range between 60–96% depending on the community configuration. Moreover, the market model accounts for uncertainties in supply and demand and suggests a methodology to overcome the community budget deficit.