Highlights• Optimal configuration and dimensioning of building energy system• Novel LP model optimizing building operation as frequency containment reserve (FCR)• Simulation of optimal building operation with energy storages and FCR trade• Evaluation of cost-efficiency of power storage in building with FCR trade