The peak pattern of a magnetic fluid, in both a vertical dc and an additional vertical ac magnetic field, behaves as an oscillator. Using the ac-dc field ratio as a control parameter, we study the dynamics of this oscillator. For low values, the peaks oscillate at the ac field frequency, whereas for a large enough value the oscillation is subharmonic (period doubling). The phase diagram is interpreted in terms of a bounded parametric resonance driven by the nonlinearity of the oscillator. In 2D this transition occurs with symmetry breaking from a triangular to a square pattern.