Global investors have rendered their verdict on Donald J. Trump as president: Sell government bonds and pile into stocks that will benefit the most from a resurgent United States economy.

From Indonesia to the United States, government bonds are undergoing a sharp sell-off as investors — large sovereign wealth funds and hedge funds, as well as the accounts of American retirees — restructure investment portfolios to try to capture the fruits of what they expect will be a free-spending Trump presidency.

Across the board, the yields of these bonds, which move up as their prices decline, are pushing higher. The yield on the 10-year United States Treasury note — a benchmark for mortgages and other lending rates — has risen to 2.2 percent from 1.5 percent in less than two months. For such a widely held and traded security, that is an unusually abrupt move.

Other safe-haven bonds have had similar reactions. The yield on Germany’s 10-year notes has gone to positive. In just a week, it has gone to 0.35 percent from negative 0.15 percent.