One key requirement of a smart grid communication network (SGCN) is to provide wireless-enabled devices with a frequency spectrum for data transmission. This spectrum can be partially supplied from existing neighboring communication networks (NCNs) via spectrum ordering. The scope of this paper is to propose a coexistence scheme, in which NCNs declare their own price per frequency channel and allow an SGCN to make decisions on the number of channels to be ordered. Due to dynamic NCN conditions and, accordingly, time-varying channel pricing, the spectrum ordering by an SGCN over a time horizon is formulated as a stochastic optimization problem. Having decoupled the problem over time, a dynamic spectrum allocation scheme is proposed. As a result of this scheme, the required data transmission rate of an SGCN is provided statistically. Numerical results demonstrate the effectiveness of the proposed scheme from the viewpoint of the grid operational cost.