We apply adjoint algorithmic differentiation (AAD) to the risk management of securities when their price dynamics are given by partial differential equations (PDE). We show how AAD can be applied to forward and backward PDEs in a straightforward manner. In the context of one-factor models for interest rates or default intensities, we show how price sensitivities are computed reliably and orders of magnitude faster than with a standard finite-difference approach. This significantly increased efficiency is obtained by combining (i) the adjoint forward PDE for calibrating model parameters, (ii) the adjoint backward PDE for derivatives pricing, and (iii) the implicit function theorem to avoid iterating the calibration procedure