  The calibration and analysis of polarization observations in Very Long
Baseline Interferometry (VLBI) requires the use of specific algorithms that
suffer from several limitations, closely related to assumptions in the data
properties that may not hold in observations taken with new-generation VLBI
equipment. Nowadays, the instantaneous bandwidth achievable with VLBI backends
can be as high as several GHz, covering several radio bands simultaneously. In
addition, the sensitivity of VLBI observations with state-of-the-art equipment
may reach dynamic ranges of tens of thousands, both in total intensity and in
polarization. In this paper, we discuss the impact of the limitations of common
VLBI polarimetry algorithms on narrow-field observations taken with modern VLBI
arrays (from the VLBI Global Observing System, VGOS, to the Event Horizon
Telescope, EHT) and present new software that overcomes these limitations. In
particular, our software is able to perform a simultaneous fit of multiple
calibrator sources, include non-linear terms in the model of the instrumental
polarization and use a self-calibration approach for the estimate of the
polarization leakage in the antenna receivers.
