Global corporate bonds are in fine fettle, even as stock markets struggle to propel themselves higher. No matter the problemwhether it be jitters over China's financial system, Russia's incursion into Ukraine, or doubts about the U.S. recoverycorporate bonds seem to benefit. The search for yield shows no signs of flagging yet.

Corporate bonds have benefited from the forces that have caught investors off guard so far this year. The unexpected decline in underlying government bond yields has acted as a tailwind, while the wobbly performance of stock markets and the problems in emerging markets have made corporate debt look like a good alternative. U.S. and European investment-grade corporate bonds are up around 2% in the year to date, according to Barclays  PLC indexes, edging ahead of stock indexes like the Standard & Poor's 500 and the Stoxx Europe 600, while high-yield bonds are up 2.5% to 3%.

Low defaults and strong performance are pushing some measures of corporate-credit risk back to levels last seen before the global financial crisis. For instance, it now costs just €256,000 (about $355,000) a year to insure €10 million of debt via the Markit iTraxx Crossover index of mostly junk-rated credits—a good proxy for high-yield bond spreads. That level was last seen in early July 2007 and is also below the average for the Crossover index between 2004 and 2006, Citigroup noteshalcyon days for Europe's credit markets. European investment-grade bond yields have fallen below 2% on average.

But despite that, the appetite for bonds is strong, although to boost returns, investors are buying riskier securities. In Europe, there has been strong appetite for subordinated debt of banks and nonfinancial companies, paper that offers higher yields but is likely to be more volatile in times of trouble. Meanwhile, the U.S. last week wrapped up its third-biggest week on record for investment-grade issuance, with nearly $50 billion of debt sold, according to Royal Bank of Scotland.

And cash is continuing to flow into the market: in Europe, retail investors plowed nearly $3 billion into corporate bond funds in the week ending March 5, the highest amount in 41 weeks, even as equity flows dwindled to a 16-week low of $597 million, Bank of America Merrill Lynch notes. Globally, investment-grade funds have recorded 11 straight weeks of inflows.

The strong performance seems more sustainable in Europe than in the U.S., which looks vulnerable on two fronts. First, if U.S. growth picks up, markets are likely to start fretting about rising rates. While corporate bond spreads might continue to tighten due to a better growth outlook, overall returns will be dented. Second, U.S. corporations are coming under increasing pressure to reward shareholders by boosting leveragebad news for corporate bondholders.

But in Europe, with inflation extremely low and growth picking up very gently, both of those risks remain distant. Corporate bonds could remain a favorite for investors in Europe for a good while yet.