The benchmark S&P 500 edged up on Wednesday as the stronger energy sector and soaring shares of Vertex Pharmaceuticals offset declines in financial shares and investors began looking ahead to first-quarter earnings season.
The Dow Jones Industrial Average edged lower, falling for the ninth session out of the past 10.
Investors have been assessing what the Republicans' failure to pass a healthcare bill means for tax reform and the rest of President Donald Trump's agenda, hopes for which have helped drive stocks to record highs.
They are looking to first-quarter earnings to support lofty valuations for stocks, with the S&P 500 trading at nearly 18 times earnings estimates for the next 12 months against its long-term average of 15 times.
First-quarter earnings for S&P 500 companies are expected to rise 10.1 percent, according to Thomson Reuters I/B/E/S.
"The policy risk has increased ... but economic data still remains solid and therefore earnings should be good," Walter Todd, chief investment officer of Greenwood Capital in Greenwood, South Carolina. "Absent some revelation on the policy front, I think that’s the next catalyst for the market, is when we start seeing companies report."The Dow Jones Industrial Average .DJI fell 30.55 points, or 0.15 percent, to 20,670.95, the S&P 500 .SPX gained 2.72 points, or 0.12 percent, to 2,361.29 and the Nasdaq Composite .IXIC added 21.12 points, or 0.36 percent, to 5,896.26.
The energy sector .SPNY gained 1.2 percent, leading all sectors, supported by stronger oil prices CLc1.
Financial shares .SPSY fell back 0.4 percent a day after leading a rally.
Amazon.com (AMZN.O) rose 2.2 percent and hit an all-time high, giving the biggest boost to the S&P 500 and Nasdaq.
In corporate news, Vertex Pharmaceuticals (VRTX.O) soared 21 percent after the company's cystic fibrosis treatment succeeded in a late-stage study. The stock boosted the S&P and helped drive the Nasdaq Biotechnology index .NBI up 1.2 percent.
Mylan (MYL.O) shares fell 3.3 percent after its application to market a generic version of an inhaled lung drug was rejected.
Advancing issues outnumbered declining ones on the NYSE by a 1.97-to-1 ratio; on Nasdaq, a 1.65-to-1 ratio favoured advancers.
The S&P 500 posted 13 new 52-week highs and 1 new lows; the Nasdaq Composite recorded 77 new highs and 23 new lows.
(Additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by Anil D'Silva and Nick Zieminski)