A geometric parametrization for the virtual Euler characteristics of the moduli spaces of real and complex algebraic curves