The impact of undiversified idiosyncratic risk on value-at-risk and expected shortfall can be approximated analytically via a methodology known as granularity adjustment (GA). In principle, the GA methodology can be applied to any risk-factor model of portfolio risk. Thus far, however, analytical results have been derived only for simple models of actuarial loss, i.e., credit loss due to default. We demonstrate that the GA is entirely tractable for single-factor versions of a large class of models that includes all the commonly used mark-to-market approaches. Our approach covers both finite ratings-based models and models with a continuum of obligor states. We apply our methodology to CreditMetrics and KMV Portfolio Manager, as these are benchmark models for the finite and continuous classes, respectively. Comparative statics of the GA with respect to model parameters in CreditMetrics reveal striking and counterintuitive patterns. We explain these relationships with a stylized model of portfolio risk.