The Spectral Slope and Escape Fraction of Bright Quasars at $z \sim
  3.8$: the Contribution to the Cosmic UV Background
  We use a sample of 1669 QSOs ($r<20.15$, $3.6<z<4.0$) from the BOSS survey to
study the intrinsic shape of their continuum and the Lyman continuum photon
escape fraction (f$_{esc}$), estimated as the ratio between the observed flux
and the expected intrinsic flux (corrected for the intergalactic medium
absorption) in the wavelength range 865-885 \AA\ rest-frame. Modelling the
intrinsic QSO continuum shape with a power-law,
$F_{\lambda}\propto\lambda^{-\gamma}$, we find a median $\gamma=1.30$ (with a
dispersion of $0.38$, no dependence on the redshift and a mild intrinsic
luminosity dependence) and a mean f$_{esc}=0.75$ (independent of the QSO
luminosity and/or redshift). The f$_{esc}$ distribution shows a peak around
zero and a long tail of higher values, with a resulting dispersion of $0.7$. If
we assume for the QSO continuum a double power-law shape (also compatible with
the data) with a break located at $\lambda_{\rm br}=1000$ \AA\ and a softening
$\Delta\gamma=0.72 $ at wavelengths shorter than $\lambda_{\rm br}$, the mean
f$_{esc}$ rises to $=0.82$. Combining our $\gamma$ and f$_{esc}$ estimates with
the observed evolution of the AGN luminosity function (LF) we compute the AGN
contribution to the UV ionizing background (UVB) as a function of redshift. AGN
brighter than one tenth of the characteristic luminosity of the LF are able to
produce most of it up $z\sim 3$, if the present sample is representative of
their properties. At higher redshifts a contribution of the galaxy population
is required. Assuming an escape fraction of Lyman continuum photons from
galaxies between $5.5$ and $7.6\%$, independent of the galaxy luminosity and/or
redshift, a remarkably good fit to the observational UVB data up to $z\sim 6$
is obtained. At lower redshift the extrapolation of our empirical estimate
agrees well with recent UVB observations, dispelling the so-called Photon
Underproduction Crisis.
