Valuation of electricity storage contracts based on the COS method