Dynamical symmetries and harmonic generation