This paper studies the criterion of local risk-minimization for life insurance contracts in a financial market, which includes longevity bonds. The longevity bond is a bond specifying payments, which are linked to the current number of survivors in a given portfolio of insured lives. The number of survivors is modeled via a double-stochastic process, where the mortality intensity is driven by a time-inhomogeneous Cox–Ingersoll–Ross model. In addition to the longevity bond, the financial market is assumed to consist of a traditional bond and a savings account. We define the price process of the longevity bond by introducing a pricing measure. The paper extends previous work in the literature to the case where the traded assets are not martingales under the measure used for determining the optimal strategies. We compare our results under the real measure with the former results of globally risk-minimizing strategies, obtained using an equivalent martingale measure. Copyright © 2014 John Wiley & Sons, Ltd.