This research analyses the case of a Virtual Power Plant (VPP) in regulated electricity markets, trading energy with the consumers and the grid under a Power Purchase Agreement (PPA). The VPP propagates the deployment of solar PVs while balancing its intermittency with a dispatchable power plant, which is assumed in this research to be a CCHP, supplying cooling, heating, and power. The VPP also integrates energy storage systems for a comprehensive assessment. Traditionally, the VPP concept has not been introduced in regulated markets, but it is widely researched in deregulated markets where VPPs trade energy with the electricity grid for profit maximisation. In regulated markets, a special architecture is proposed for a VPP that mediates between residential compounds and electricity grids for profit maximization and energy demand coverage, thus converting the compound into a power generator with minimum dependence on the grid for its energy demand. In the literature on aggregated energy systems in regulated markets, it is usually overlooked to perform detailed energy modelling and optimisation on an hourly level. Only basic rule-based frameworks for energy management are proposed. In this research, it is initially assumed that since the VPP integrates multi-energy components supplying heating, cooling and electricity, optimization of the output of each component for a common profit maximization, is necessary. However, in VPP-related literature, the capacity of each component, which is a main input for energy modelling, is traditionally assumed and not assessed. Therefore, the research aims to explore how to find the optimal capacity configuration of the residential VPP that achieves optimal profit. The paper analyses an iterative exhaustive search framework, integrating the 2-levels of energy optimisation (hourly profit maximisation objective) and capacities optimisation (Life cycle CAPEX & OPEX minimisation). Compared to baseline cases, where only energy optimisation is performed, and capacities are assumed and not assessed in terms of capital investment, the proposed framework achieved a higher annual profit by 3.1 % and a payback period of 11 years. The results also provide comprehensive 3D charts drawing the relations between the achieved profit against capacities configurations, thus allowing high-level decision-making. The results also prove the hypothesis that hourly energy optimisation should not be performed without investment cost assessment and that targeting the minimization of investment costs will indirectly benefit the achieved profit.