At present, electricity transaction in China is mainly conducted by medium- and long-term market contracts, while the spot electricity market has not yet been implemented. An appropriate energy imbalance processing mechanism for medium- and long-term power transactions is highly demanded for maintaining the stability of market operation, since it is supposed to guide market participants to reduce system imbalances and actively provide balancing services. Given this background, a bi-level optimization model for developing optimal bidding strategies of power producer in the monthly sequential contract and balancing markets is proposed based on the currently implemented monthly pre-listing balancing mechanism in China. In the upper level of the model, the monthly utility which makes a tradeoff between revenues and risks produced by the bidding strategy of the producer in the monthly sequential energy dual-market is maximized, considering the uncertainties of the monthly energy imbalances in the power system and the bidding strategies of rivals. In the lower level, the dispatch cost is minimized by simulating the three-stage process of sequential system operation, which includes contract market clearing by power exchange (PX), energy decomposition and modification by the system operator (SO) and balancing market clearing by PX. The simulation results of an eastern provincial electricity market in China show that the presented model can assist power producers in adjusting their monthly bidding strategies with relevant factors, such as the minimum output level of each producer, risk preference, and forecast information including system energy imbalance status and bidding strategies of rivals. In addition, the proposed method is also helpful for market designers in setting market parameters, such as government-authorized contract energy proportion and settlement thresholds in the balancing market.