  In this paper, we propose a novel approach for data-driven decision-making
under uncertainty in the presence of contextual information. Given a finite
collection of observations of the uncertain parameters and potential
explanatory variables (i.e., the contextual information), our approach fits a
parametric model to those data that is specifically tailored to maximizing the
decision value, while accounting for possible feasibility constraints. From a
mathematical point of view, our framework translates into a bilevel program,
for which we provide both a fast regularization procedure and a big-M-based
reformulation that can be solved using off-the-shelf optimization solvers. We
showcase the benefits of moving from the traditional scheme for model
estimation (based on statistical quality metrics) to decision-guided prediction
using three different practical problems. We also compare our approach with
existing ones in a realistic case study that considers a strategic power
producer that participates in the Iberian electricity market. Finally, we use
these numerical simulations to analyze the conditions (in terms of the firm's
cost structure and production capacity) under which our approach proves to be
more advantageous to the producer.
