  Context. Quasi-periodic variability has been observed in a number of X-ray
binaries harboring black hole candidates. In general relativity, black holes
are uniquely described by the Kerr metric and, according to the cosmic
censorship conjecture, curvature singularities always have to be clothed by an
event horizon. Aims. In this paper, we study the effect of an external magnetic
field on the observed light curves of orbiting hot spots in thin accretion
discs around Kerr black holes and naked singularities. Methods. We employ a
ray-tracing algorithm to calculate the light curves and power spectra of such
hot spots as seen by a distant observer for uniform and dipolar magnetic field
configurations assuming a weak coupling between the magnetic field and the disc
matter. Results. We show that the presence of an external dipolar magnetic
field leads to potentially observable modifications of these signals for both
Kerr black holes and naked singularities, while an external uniform magnetic
field has practically no effect. In particular, we demonstrate that the
emission from a hot spot orbiting near the innermost stable circular orbit of a
naked singularity in a dipolar magnetic field can be significantly harder than
the emission of the same hot spot in the absence of such a magnetic field.
Conclusions. The comparison of our model with observational data may allow us
study the geometry of magnetic fields around compact objects and to test the
cosmic censorship conjecture in conjunction with other observables such as
thermal continuum spectra and iron line profiles.
