The aim of this study is to find optimal component configurations for flexible biogas plants considering electricity prices in Germany, for maximum annuities considering costs and revenues. Cases for solely power-price driven operation and cogeneration-led operation were investigated for electricity prices in 2020, 2021, and 2022 in hourly resolution.Additional revenue from flexible operation increases as price volatility increased from 2020 to 2022. Interestingly, the choice of capacity for the combined heat and power unit (CHPU) is determined by the expected service life of the CHPU. Irrespective of electricity market signals, power quotients (PQ) of at least PQ = 4 avoid reinvestment for the CHPU within 20 years.Another result is that the slope of the optimality region for CHPU capacity flattens for 2022 and capacities above PQ = 4. Thus, high price volatility will allow plant operators to amortise even larger CHPUs, which could stimulate the installation of peak load by flexible biogas plants. Considering the day-ahead market can provide clear recommendations for optimal component configurations.The presented Smart-Force-Optimization (SFO) combines a prefiltering of schedules matching given constraints and a brute force optimisation to the filtered subset. Thus, SFO has an improved performance comparing to bare brute force approaches.