TY - EJOU AU - Torres, Pol AU - Clavera, Alejandro AU - Molina, Carlos AU - Zarpellon, Giulia AU - Fabri, Marcelus AU - Gallego, Diego AU - Plana, Pau AU - Millet, Lluís TI - An Integrated Forecasting and Optimization Framework for Battery Energy Storage Participation in Spanish Electricity Markets T2 - Energy Engineering PY - VL - IS - SN - 1546-0118 AB - Battery energy storage systems can capture stacked revenue by placing bids in the energy markets, arbitraging day-ahead prices, correcting positions in intraday auctions, and providing ancillary services such as secondary regulation, either as a standalone power plant or collocated with photovoltaic or wind generation. However, profitable participation requires (i) accurate short-term price forecasting across coupled market products and (ii) an optimization model that enforces market rules, grid connection limits and state-of-charge feasibility under uncertainty. This paper presents an end-to-end decision-support framework for the Spanish electricity market that combines machine-learning forecasting with a mixed-integer linear programming scheduler and an adjustable robust optimization extension. The forecasting layer relies on XGBoost models using publicly available data from the Spanish system operator, meteorological observations and gas prices, including calendar and event features. The scheduling layer explicitly models the market coupling, point-of-connection limits and two imbalance settlement options (priced and penalized). The adjustable robust optimization formulation uses budgeted uncertainty sets and strong duality to produce tractable robust counterparts that trade expected profit for improved downside protection. A redispatch simulator sequentially re-optimizes as markets clear, preserving committed trades while updating remaining degrees of freedom. Results demonstrate that forecast quality and the robustness budget Γ jointly shape bidding decisions and imbalance exposure. These findings provide practical guidance for operating BESS or collocated portfolios in multi-settlement electricity markets. KW - Battery energy storage systems; photovoltaics; electricity markets; price forecasting; machine learning; robust optimization DO - 10.32604/ee.2026.084810