The increasing renewable generations in the power system have contributed to the reduction of carbon emission. However, their uncertainty and volatility have also challenged the system operation. To handle this, we propose a joint clearing model of energy, regulation, reserve and ramping product from both thermal generators and energy storage stations. In the proposed model, the couplings of energy and these ancillary services are studied, and the deliverability of reserve in contingency scenarios is ensured by including the post-contingency network constraints into the model. In addition, the associated marginal pricing approaches of energy, regulation, reserve and ramping are also established. The proposed co-optimization mechanism can efficiently enhance the elasticity of the power system and help the accommodation of renewable generations.