In this paper, we develop a framework for valuing a battery energy storage system as it participates in the wholesale electricity market. We utilize an economic optimization routine with an internal battery energy storage model to plan when a battery should offer its power into the marketplace to maximize its benefit to the electric grid-and maximize its value. We examine the potential value of a vanadium redox flow battery (VRFB) used for frequency regulation service in the Texas organized electricity market from 2007-2009. Our results show that the price point where a VRFB system used for frequency regulation in Texas would be a good investment is approximately $1500/kW. We show that the expected annual revenue from frequency regulation is highly dependent on variations in wholesale prices, and that longer-duration storage could provide increased revenue from frequency regulation up to approximately 3 hours of storage capacity.