This paper investigates the relationship between stock returns in the energy sector, energy uncertainty, and geopolitical risk. To this end, we propose a parsimonious and flexible model to extract common volatility factors (COVOL) from panel data. This general nonlinear multi-factor framework organizes panel units into groups based on different exposures to individual and compounding risks to reduce the number of parameters to be estimated. The group membership of the units is unknown, which naturally calls for using stochastic partition models. Random partition and compounding relationships are encoded in the weighted hyper-edges of a random hypergraph where the vertexes are the individual risks. In the empirical analysis, we study the volatility transmission in a multi-country setting and the role of individual and compounding risks.