Financial stocks lifted the S&P 500 to a record closing high for a fourth consecutive session on Tuesday and the dollar strengthened as US Federal Reserve Chair Janet Yellen struck a hawkish tone on the timing of an interest rate hike.
Yellen told the US Senate Banking Committee the central bank will likely need to raise interest rates at an upcoming meeting, although she expressed caution about the considerable economic policy uncertainty under the Trump administration.
Financial stocks moved higher following her remarks and closed up 1.2 percent as the best performing sector of the S&P 500. Utilities and real estate, which tend to weaken in a rising rate environment, ended down 0.7 percent and 0.5 percent, respectively.
The Fed signaled in December that it expected to raise rates three times in 2017.
The dollar reversed course after Yellen's comments and was up 0.3 percent after touching a three-week high of 101.38 against a basket of major currencies.
"It's actually a very wise move to try to get the rate hikes going sooner rather than later to cut off the potential for inflation, although I really don't see inflation picking up all that much over the next year or so," said Peter Tuz, president of Chase Investment Counsel in Charlottesville, Virginia.
Thomson Reuters data shows traders see a 17.7 percent chance of a 25-basis-point hike in rates at the Fed's March meeting.
The greenback was initially under pressure following the resignation of President Donald Trump's national security adviser, Michael Flynn, over revelations he had discussed US sanctions against Moscow with the Russian ambassador to the United States before Trump took office.
Yellen's hawkish tone dovetailed with recent comments from other Fed officials.
Dallas Fed President Robert Kaplan on Monday argued the Fed should move soon to avoid falling behind the curve, especially as fiscal policy could drive faster growth and inflation. Earlier on Tuesday, Richmond Fed President Jeffrey Lacker said the central bank will likely have to raise interest rates more rapidly than financial markets currently expect.
The Dow Jones Industrial Average .DJI rose 92.25 points, or 0.45 percent, to 20,504.41, the S&P 500 gained 9.33 points, or 0.40 percent, to 2,337.58 and the Nasdaq Composite added 18.62 points, or 0.32 percent, to 5,782.57.
Along with the S&P, the Dow notched its fourth straight record, while the Nasdaq closed at a high for a sixth consecutive day.
MSCI's all-country world index edged up 0.08 percent. Europe's broad FTSEurofirst 300 index slipped 0.04 percent to snap a five-session winning streak.
Yields on benchmark US 10-year Treasury notes climbed to 2.4734 percent, down 11/32 in price, after hitting a high of 2.502 percent.
Oil pared earlier gains, settling slightly higher as concerns about rising supply from US shale output overshadowed an OPEC-led effort to cut global output, which has supported oil prices in a higher range. Brent crude LCOc1 settled up 0.7 percent at $55.97 and US crude settled 0.5 percent higher at $53.20 a barrel.