AbstractIn this study, we provide a simple one period mean-field-games setting for the joint optimal trading problem for electricity producers in the electricity markets. Based on the Markowitz mean-variance approach from stock trading, we consider a decision problem of an electricity provider when determining the optimal fractions of production that should be traded in the day-ahead and in the intraday markets. Moreover, all such providers are related by a ranking criterion and each one wants to perform as good as possible in this ranking. We first start with a simple model where only the price risk in the intraday market is present and subsequently extend the problem to the cases involving either production and/or demand uncertainty. The key technique is to reduce the optimality conditions to a first order non-linear ordinary differential equation. We will illustrate our findings by various numerical examples. Our findings will in particular be important for electricity producers using renewable resources.