Many-body effects are known to play a crucial role in the electronic and optical properties of solids and nanostructures. Nevertheless, the majority of theoretical and numerical approaches able to capture the influence of Coulomb correlations are restricted to the linear response regime. In this work, we introduce an approach based on a real-time solution of the electronic dynamics. The proposed approach reduces to the well-known Bethe-Salpeter equation in the linear limit regime and it makes it possible, at the same time, to investigate correlation effects in nonlinear phenomena. We show the flexibility and numerical stability of the proposed approach by calculating the dielectric constants and the effect of a strong pulse excitation in bulk h-BN.