The interplanetary magnetic field (IMF) controls magnetospheric currents which cause variations of the ground-based magnetic field. Regular magnetic observations made in the 19th century allow us to infer daily IMF polarities back to 1844. The results coincide with satellite data in about 79% days. Moreover, for the most part of the 19th and 20th centuries, proxies obtained from various geomagnetic data (Helsinki, Saint-Petersburg, Potsdam, and Ekaterinburg) show the same patterns. This suggests that the reliability of the proxies is sufficient to study the IMF in the past. The large-scale organization of the IMF polarities, the so-called sector structure, reveals semi-centennial north-south displacements of the heliospheric current sheet (HCS).