This paper presents an efficient algorithm for computing the allocation weights of the risk parity portfolio (or the more general risk budget portfolio) based on Newton's method. The algorithm is provably convergent, and in dimension < 1000 requires on average less than 5 iterations