Banks and other financial companies led US stocks slightly higher on Wednesday, snapping a two-day losing streak for the market.
The latest gains were partially offset by a slide in energy companies following a steep slump in the price of US crude oil, which fell 5.1%, its biggest single-day drop in nearly three months.
Trading was mostly subdued, with the major indexes trading in a narrow range as investors sized up the latest company earnings and looked ahead to testimony Thursday from former FBI Director James Comey, part of a congressional investigation into Russia's possible election meddling.
The Standard & Poor's 500 index rose 3.81 points, or 0.2%, to 2,433.14. The Dow Jones industrial average gained 37.46 points, or 0.2%, to 21,173.69. The Nasdaq composite index added 22.32 points, or 0.4%, to 6,297.38. The Russell 2000 index of small-company stocks picked up 1.78 points, or 0.%, to 1,396.67.
The major indexes remain slightly below record highs set late last week.
Stocks wavered between small gains and losses early on Wednesday as investors weighed the latest company earnings reports.
Financials were the biggest gainers in the S&P 500, rising 0.8%. The sector is up 23% this year.
JPMorgan Chase gained 95 cents, or 1.2%, to 83.91 dollars. American Express rose 96 cents, or 1.2%, to 79.81 dollars.
Oil futures fell sharply after a report showed that US crude stockpiles grew 3.3 million barrels last week. Experts had expected stockpiles to shrink by 3.5 million barrels.
Benchmark US crude slid 2.47 dollars, or 5.1%, to close at 45.72 dollars per barrel in New York. Brent crude, used to price international oils, fell 2.06 dollars, or 4.1%, to settle at 48.06 dollars per barrel in London.
The dollar rose to 109.83 yen from Tuesday's 109.54 yen. The euro weakened to 1.1252 dollars from 1.1271 dollars.
In Europe, London's FTSE 100 slid 0.6% ahead of Thursday's British elections. Traders were also looking ahead to a policy meeting of the European Central Bank on Thursday.
Germany's DAX slipped 0.1%, while France's CAC 40 fell 0.1%. In Asia, Tokyo's Nikkei 225 and Sydney's S&P-ASX 200 were unchanged. Hong Kong's Hang Seng fell 0.2%. Seoul's Kospi shed 0.4%.