  Flexible loads, i.e. the loads whose power trajectory is not bound to a
specific one, constitute a sizable portion of current and future electric
demand. This flexibility can be used to improve the performance of the grid,
should the right incentives be in place.
  In this paper, we consider the optimal decision making problem faced by a
flexible load, demanding a certain amount of energy over its availability
period, subject to rate constraints. The load is also capable of providing
Ancillary Services (AS) by decreasing or increasing its consumption in response
to signals from the Independent System Operator. Under arbitrarily distributed
and correlated Markovian energy and AS prices, we obtain the optimal policy for
minimizing expected total cost, which includes cost of energy and benefits from
AS provision, assuming no capacity reservation requirement for AS provision. We
also prove that the optimal policy has a multi-threshold form and can be
computed, stored and operated efficiently. We further study the effectiveness
of our proposed optimal policy and its impact on the grid.
  We show that, while optimal simultaneous consumption and AS provision under
real-time stochastic prices is achievable with acceptable computational burden,
the impact of adopting such real-time pricing schemes on the network might not
be as good as suggested by the majority of the existing literature. In fact, we
show that such price responsive loads are likely to induce peak-to-average
ratios much more than what is observed in the current distribution networks and
adversely affect the grid.
