Investors' enthusiasm for stocks continued for a third straight day on Wednesday, despite a report from the Federal Reserve that showed a growing chorus of central bank officials willing to raise interest rates sooner rather than later.
In the bond market, prices fell and yields rose as investors prepared themselves for higher interest rates.
The Dow Jones industrial average rose 59.54 points, or 0.4 percent, to 16,979.13. The Standard & Poor's 500 index rose 4.91 points, or 0.3 percent, to 1,986.51, less than two points away from its late-July record close of 1,987.98.
The Nasdaq composite was mostly unchanged on the day, falling 1.03 points, less than 0.1 percent, to 4,526.48.
The majority of Fed policymakers believe the U.S. economy is improving enough that the bank should start considering how it's going to start raising interest rates, according to minutes from the bank's latest meeting.
The debate on when the Fed should raise interest rates, which have been near zero since 2008, has intensified in recent months as the central bank winds down its other economic stimulus.
The Fed has been winding down its bond-buying program since December, and is expected to end it completely before the end of the year. Despite worries that the Fed's exit might be a net negative for the market, stocks have remained resilient. The S&P 500 is up 7.5 percent this year.
Jonathan Corpina, a floor trader at the New York Stock Exchange with Meridian Equity Partners, said investors are prepared to see the Fed raise interest rates.
"We've been talking about raising interest rates for so long, I don't think the Fed is going to surprise anybody when they finally do it," Corpina said.
The Fed's key short-term interest rate influences the prices of a huge array of investments, including Treasuries, other kinds of bonds and stocks. If the Fed were to raise interest rates, investors would demand higher yields on bonds.
The Fed minutes prompted some investors to sell bonds. The yield on the U.S. 10-year Treasury note rose to 2.43 percent from 2.40 percent the day before. Bond yields rise when prices fall.
Trading has been quiet this week as the summer winds down and with many traders on vacation. Tuesday was the third-slowest trading day of the year and Wednesday was 12th-slowest day.
On Friday, Fed Chair Janet Yellen will give a speech at the bank's annual conference in Jackson Hole, Wyoming. The speech is often a venue where the leader of the Fed lays out major policy decisions.
"Janet Yellen's speech in Jackson Hole will most likely guide the markets (now that) earnings season is winding down," Doug Cote, chief market strategist with Voya Investment Management, said.