U.S. stocks closed at record highs on Wednesday as investors digested key quarterly earnings.
The S&P 500 (INDEX: .SPX) rose 0.54 percent to close at 2,473.83, a record. The index also posted an intraday record. Vertex Pharmaceuticals led the index higher , rising 21 percent. The S&P also received a boost from tech, which broke above its all-time high set in March 2000.
The Nasdaq composite (NASDAQ: .IXIC) advanced 0.64 percent to end at a record of 6,385.04; it also notched an intraday all-time high.
The Dow Jones industrial average (Dow Jones Global Indexes: .DJI) also closed at a record, rising 66.02 points to 21,640.75.
"Earnings are clearly the driver in the equity market," said Jon Adams, senior investment strategist at BMO Global Asset Management. "We had an earnings recession last year but we now have consecutive quarters of earnings growth."
Morgan Stanley reported better-than-expected second-quarter results across the board, with trading revenue coming in above expectations . Other banks like Citigroup, Goldman Sachs and JPMorgan Chase saw their trading businesses struggle last quarter.
Dow-component IBM reported mixed quarterly results, with earnings per share topping expectations and sales disappointing. The company also said its revenue declined for the 21st straight quarter, pushing the stock down by 4.2 percent and capping gains on the price-weighted Dow. IBM is the fifth-largest Dow component by share price.
Overall, "earnings were expected to be fairly strong and that's certainly followed through," said Shannon Saccocia, head of asset allocation & portfolio strategy at Boston Private.
Of the 53 S&P 500 components that had reported as of Tuesday morning, 77 percent exceeded earnings expectations while 75 percent topped on revenue, according to data from The Earnings Scout.
Equities entered the session trading in record territory, with the Nasdaq and S&P notching record closes on Tuesday. This despite lingering uncertainty around the Trump administration's ability to move forward with its fiscal agenda.
On Tuesday, three GOP senators said they would oppose a push to repeal Obamacare without a replacement, seemingly stalling other legislative plans. The Trump administration has said they wanted to repeal and replace Obamacare before moving to other items like tax reform.
"The political situation is keeping some investors worried, but that's the healthy skepticism needed for the market to keep going higher," said Maris Ogg, president at Tower Bridge Advisors. "But we're getting to a point from a multiples perspective that it's getting harder and harder" to find value.
However, Boston Private's Saccocia these health-care headlines "are coming at a great time. We're getting a lot of earnings news on the wire and that's offsetting some of the health-care news."
Elsewhere on the politics front, House Speaker Paul Ryan said the House would start drafting legislation to overhaul the nation's tax code after the summer recess.
In economic news, housing starts jumped 8.3 percent last month, hitting their highest level since February. Mortgage applications, meanwhile, rose 6.3 percent .
U.S. Treasury yields rose, with the benchmark 10-year note yield near 2.27 percent and the two-year yield around 1.36 percent. That said, yields are well below their highs of the year.
"You're now seeing a disconnect between the stock market and the bond market," said Mark Spellman, portfolio manager at Alpine Funds. "The bond market is starting to tell you the economy may be slowing but the stock market doesn't care."
—Reuters contributed to this report.
More From CNBC