We introduce an adaptive importance sampling method for the loss distribution of credit portfolios based on the Robbins-Monro stochastic approximation procedure. After presenting the subtle construction of the algorithm, we apply our adaptive scheme for calculating the risk figures of a typical...