Environmental concerns have spurred greater reliance on variable renewable energy resources (VERs) in electric generation. Under current incentive schemes, the uncertainty and intermittency of these resources impose costs on the grid, which are typically socialized across the whole system, rather than born by their creators. We consider an institutional framework in which VERs face market imbalance prices, giving them an incentive to produce higher-value energy subject to less adverse uncertainty. In this setting, we consider an {\textquotedblleft}aggregator{\textquotedblright} that owns the production rights to a VER{\textquoteright}s output, and also signs contracts with a population of demand response (DR) participants for the right to curtail them in real time, according to a contractually specified probability distribution. The aggregator bids a day ahead offer into the wholesale market, and is able to offset imbalances between the cleared day-ahead bid and the realized VER production by curtailing DR participants{\textquoteright} consumption according to the signed contracts. We consider the optimization of the aggregator{\textquoteright}s end-to-end problem: designing the menu of DR service contracts using contract theory, bidding into the wholesale market, and dispatching DR consistently with the contractual agreements. We do this in a setting in which wholesale market prices, VER output, and participant demand are all stochastic, and possibly correlated.