  In recent years, there has been a significant focus on advancing the next
generation of power systems. Despite these efforts, persistent challenges
revolve around addressing the operational impact of uncertainty on predicted
data, especially concerning economic dispatch and optimal power flow. To tackle
these challenges, we introduce a stochastic day-ahead scheduling approach for a
community. This method involves iterative improvements in economic dispatch and
optimal power flow, aiming to minimize operational costs by incorporating
quantile forecasting. Then, we present a real-time market and payment problem
to handle optimization in real-time decision-making and payment calculation. We
assess the effectiveness of our proposed method against benchmark results and
conduct a test using data from 50 real households to demonstrate its
practicality. Furthermore, we compare our method with existing studies in the
field across two different seasons of the year. In the summer season, our
method decreases optimality gap by 60% compared to the baseline, and in the
winter season, it reduces optimality gap by 67%. Moreover, our proposed method
mitigates the congestion of distribution network by 16.7\% within a day caused
by uncertain energy, which is a crucial aspect for implementing energy markets
in the real world.
