The expansion of ﬂuctuating renewable energy sources leads to an increasing impact of weather-related uncertainties on future decentralized energy systems. Stochastic modeling techniques enable an adequate consideration of the uncertainties and provide support for both investment and operating decisions in such systems. In this paper, we consider a residential quarter using photovoltaic systems in combination with multistage air-water heat pumps and heat storage units for space heating and domestic hot water. We model the investment and operating problem of the quarter’s energy system as two-stage stochastic mixed-integer linear program and optimize the thermal storage units. In order to keep the resulting stochastic, large-scale program computationally feasible, the problem is decomposed in combination with a derivative-free optimization. The subproblems are solved in parallel on high-performance computing systems. Our approach is integrated in that it comprises three subsystems: generation of consistent ensembles of the required input data by a Markov process, transformation into sets of energy demand and supply proﬁles and the actual stochastic optimization. ... mehrAn analysis of the scalability and comparison with a state-of-the-art dual-decomposition method using Lagrange relaxation and a conic bundle algorithm shows a good performance of our approach for the considered problem type. A comparison of the effective gain of modeling the quarter as stochastic program with the resulting computational expenses justiﬁes the approach. Moreover, our results show that heat storage units in such systems are generally larger when uncertainties are considered, i.e., stochastic optimization can help to avoid insufﬁcient setup decisions. Furthermore, we ﬁnd that the storage is more proﬁtable for domestic hot water than for space heating.