Renewable energy resources could be practically utilized via “microgrids”. In recent years, increasing the penetration of these resources has created several challenges in power systems operation and its security. On the other hand, the expansion of microgrids paves the way for the small-scale producers and consumers and allows them to improve the efficiency of electricity markets by providing requested power quality by consumers. Therefore, it is necessary to provide a mechanism for local trading in these networks, especially in islanded microgrids, to guarantee the interest of different producers and consumers while they participate in such a market. The focus of this dissertation is on providing a model for power management of an islanded microgrid, which also provides a mechanism for clearing the energy market by overcoming challenges due to renewable energy resources. In this dissertation, electricity market modeling consists of day-ahead and real-time markets. Such a market in an islanded microgrid is called “ micromarket ” in this thesis. At the first step, a deterministic model over the next 24 hours is formulated, and simulated on the CIGRE test network and the results are discussed. Then a stochastic two stage model, based on the scenario generation method, is presented to consider some uncertainties. The results show the proposed model can overcome the challenges caused by the uncertainty of renewable resources and finally maximize the social welfare for the next 24-hours by utilizing energy storage systems, demand response, and allocating adequate power reserve to distributed generators. The stochastic model of the micromarket is implemented on the CIGRE test network, analyzed, and compared with the results of the deterministic model. It has been shown that stochastic modeling is more compatible with technical realities and provides the conditions for safe operation, as expected. Keywords: Islanded Microgrids, Power Management, Micromarket, Renewable Energy Resources, Demand Response, Energy Storage