In the medium- and long-term market, the power generation side and the power purchase side ensure to avoid the fluctuation of delivery prices through the medium- and long-term power contract, to avoid some market risks. This paper combines virtual power plants to aggregate distributed renewable energy to participate in market transactions. Firstly, this paper analyzes the two operation modes of power markets and combs the transaction varieties and modes in the medium- and long-term market. Secondly, the common contract power decomposition methods in the medium- and long-term market are analyzed, and the revenue model of virtual power plants is established. Then, combined with the renewable energy quota system and the green certificate trading mechanism, this paper constructs an optimization model of medium- and long-term contract trading of virtual power plants considering renewable energy derivatives. Finally, different renewable energy output scenarios are designed to analyze the benefits of virtual power plants in centralized and decentralized power markets. The example analysis shows the effectiveness of price difference contract for virtual power plants to ensure the renewable power revenue, which provides a certain reference for virtual power plants to participate in the power market.