This paper describes a model for optimal scheduling of hydroelectric systems for a price-taking producer selling energy and capacity to separate markets. The model is based on a combination of stochastic dynamic programming (SDP) and stochastic dual dynamic programming (SDDP), and treats inflow to reservoirs and energy prices as stochastic variables. It allows sales of capacity at a deterministic sequence of capacity reserve prices. Thus, the sales of energy and capacity is co-optimized within the SDDP framework. The presented model is tested on a Norwegian watercourse where the producer sells energy to the day-ahead market and capacity to the primary reserve markets. When adding the possibility to sell capacity in the model, the results show that less water is used during winter and more during summer/autumn in order to sell capacity.