The smart grid is the emerging power grid that uses the advanced communication, control, and automation technologies to generate, transmit, distribute, and trade energy. The flow of energy in the smart grid is bidirectional and the consumers are evolved into active participants in energy trading. The energy when produced in surplus is either sold back to the grid (main energy supplier) or is stored in energy storage systems and traded within the grid with other users using peer-to-peer model. In this paper, an approach is developed that integrates the direct trading mechanism between the users and utility, as well as the peer-to-peer trading model in a smart grid. The advantage of trading with other prosumers (ones that consume and produce energy) in the peer-to-peer (P2P) model in comparison to the direct trading with the utility is studied. The game theory auction-based approach is introduced in the P2P energy trading model. It was concluded that the integration of forecasting models with the auction models increased the overall cost savings of prosumers in the P2P energy trading model.