The recent cost reduction and technologic advances in medium to large scale Battery Energy Storage Systems (BESS) makes these devices a real choice alternative for wind producers operating in electricity markets. The association of a wind power farm with a BESS (the so called Virtual Power Plant VPP) provides utilities with a tool to turn the uncertainty wind power production into a dispatchable technology enabled to operate not only in the spot and adjustment markets (day-ahead and intraday markets) but also in ancillary services markets that, up to now, was forbidden to non-dispatchable technologies. Even more, recent studies have shown that the capital cost investment in BESS can only be recovered through the participation of such a VPP in the ancillary services markets. We present in this study a stochastic programming model to find the optimal participation of a VPP to the day-ahead market and secondary reserve markets (the most relevant ancillary service market) where the uncertainty in wind power generation and markets prices (day-ahead ancillary services) has been considered. A case study with real data from the Iberian Electricity Market is presented.