In response to the production and sales of electricity of micro-grid in novel power system with distributed new energy, this paper studies the electricity trading problem of smart grid based on user electricity consumption data. Firstly, the framework of the electricity trading system for micro-grids as both electricity users and producers was discussed. Then, a data-driven autoregressive integrated moving average (ARIMA) time series prediction model of electricity load for users within the micro-grid was established. Based on the difference of electricity load, the power purchase trading model and power sales trading model for micro-grids were constructed when micro-grid participates in the power market transaction as a power user and as a power producer. Finally, the economy and effectiveness of the proposed method and dual-mode trading model were verified through simulation experiments.