NEW YORK (AP) -- Stocks moved mostly lower Wednesday as gains in blue-chip energy companies and banks were not enough to make up for losses in the broader market.
The bond market took heavy losses, with the 10-year U.S. Treasury note rising to its highest level in a year and a half. The higher yields sent bond substitutes like utilities, telecommunications and real estate stocks sharply lower.
Oil stocks climbed after OPEC nations, which collectively produce more than one-third of the world's oil, agreed to trim production for the first time in eight years.
The Standard & Poor's 500 index lost 5.85 points, or 0.3 percent, to 2,198.81 and the Nasdaq composite dropped 56.24 points, or 1.1 points, to 5,323.68.
The 30-member Dow Jones industrial average closed up 1.98 points, or 0.01 percent, to 19,123.58. The gain was attributable to big increases in a handful of Dow components, mainly Goldman Sachs, Chevron and DuPont.
The bond and energy markets saw the most drama on Wednesday. Bond prices fell sharply yet again and the 10-year note's yield rose to 2.38 percent from 2.29 percent on Tuesday, a major move for that market. That yield is now trading at its highest level since July 2015.
The election of Donald Trump as the country's next president has sent investors fleeing out of safe-play assets like bonds, gold and dividend-paying stocks this month and into riskier investments like small companies, which would benefit the most from a growing domestic economy.
The Russell 2000 index, which is made up of mostly small to mid-sized companies, soared 11 percent in November. That's the biggest one-month gain for that index in five years.
Investors believe Trump's promises to cut taxes, invest heavily in infrastructure, and cut back regulation will help grow the economy and might even cause inflation, which has been almost non-existent since the financial crisis. U.S. government bonds quickly become less appealing to investors in a healthy, growing economy and in an inflationary environment.
"We have elected a pro-growth president who is going to move very quickly to make some drastic changes, and investors are trying to figure out what to do with that," said Tom di Galoma, head of Treasury trading at Seaport Global Holdings.
Di Galoma said he sees the 10-year note's yield hitting 3 percent by year end, a level not seen in nearly three years.
In energy, OPEC members finalized a deal that will cut their oil output by 1.2 million barrels a day starting in January. Preliminary terms of the deal were announced in September. It's the first time in eight years that the cartel has agreed to cut production. Russia, another major oil-producing country that is not part of OPEC, also agreed to cut its output.
The price of U.S. crude surged $4.21, or 9.3 percent, to close at $49.44 a barrel in New York. That's the biggest one-day gain since February. Brent crude, the international benchmark, gained $4.09, or 8.8 percent, to $50.47 a barrel in London.
Crude dropped almost 4 percent Tuesday as investors felt a deal was becoming less likely.
Other energy commodities also jumped sharply. Heating oil rose 11 cents to $1.57 a gallon, wholesale gasoline rose 11 cents to $1.49 a gallon and natural gas rose 3 cents to $3.35 per 1,000 cubic feet.
Higher oil prices mean more revenue for companies that extract or sell oil, and energy companies made big gains Wednesday. Exxon Mobil picked up $1.40, or 1.6 percent, to $87.30 and Chevron rose $2.22, or 2 percent, to $111.56.
More specialized oil companies, particularly drillers and oil exploration companies and companies who support drillers, soared. Marathon Oil leaped $3.11, or 20.1 percent, to $18.06. Ocean rig operator Transocean jumped $1.88, or 17 percent, to $12.90.
Banks rose as members of President-elect Donald Trump's economic team discussed ways to make it easier for banks to lend more money, which could lead to larger profits for financial institutions.
Steven Mnuchin, Trump's proposed nominee for Treasury secretary, said the administration wants to make changes to the 2010 Dodd-Frank law because it makes it harder for banks to lend. The law was passed to prevent another financial crisis, but critics say it went too far and stopped banks from making loans that people and businesses need to spend and hire.
Goldman Sachs rose $7.54, or 3.6 percent, to $219.29 and JPMorgan Chase added $1.25, or 1.6 percent, to $80.17.
The dollar rose. It climbed to 114.22 yen from 112.33 yen. The euro fell to $1.0599 from $1.0647.
In the metals market, gold dropped $16.90 to $1,173.90 an ounce, silver fell 26 cents to $16.48 an ounce and copper rose 2 cents to $2.633 a pound.