  We characterize profit-maximizing operating strategies, over some time
horizon [0,T], for an energy store which is trading in an arbitrage market. Our
theory allows for leakage, operating inefficiencies, operating constraints and
general cost functions. In the special case where the operating cost of a store
depends only on its instantaneous power output (or input), we present an
algorithm to determine the optimal strategies. A key feature is that this
algorithm is localized in time, in the sense that the action of the store at a
time t only requires information about electricity prices over some subinterval
of time [t,t_k] contained within [t,T]. To introduce more complex storage
models, we discuss methods for an example which includes minimum switching
times between modes of operation.
