Demand response programs in retail electricity markets are very popular. However, despite their success reducing average consumption, the random responsiveness of consumers to price events makes efficiency questionable achieve flexibility needed for electric systems with a large share renewable energy. This paper aims at designing demand contracts that allow act on both consumption and its vari...