The S&P was just 4.7 percent from its all-time closing high as IBM’s and Google’s earnings, released after Tuesday’s close, followed on the heels of stronger U.S. economic data.

“People were kind of nervous about earnings coming into this quarter but numbers have shown so far strength in earnings,” said King Lip, chief investment officer at Baker Avenue Asset Management in San Francisco.

But Apple, still the largest U.S. publicly traded company, fell more than 4 percent in extended trading after sales of its flagship iPhone came in below analyst targets and quarterly revenue slightly missed Wall Street expectations.

Story continues below advertisement.

Declining issues beat advancers in both the NYSE and Nasdaq during regular market hours, in a sign the market’s rally may be overstretched. The broad Russell 2000 index closed the day down 0.3 percent after earlier hitting and intraday historic high just below 900 points.

Shares in IBM Corp., the world’s largest technology services company, climbed 4.4 percent during regular market hours to $204.72, providing just about all of the Dow’s 67-point gain.

Also helping the tech sector was a 5.5 percent jump in Google Inc. to $741.50. The Internet search company reported its core business outpaced expectations and revenue was higher than expected.

The S&P technology sector rose 1.2 percent.

The Dow Jones industrial average rose 66.96 points or 0.49 percent, to 13,779.17, the S&P 500 gained 2.22 points or 0.15 percent, to 1,494.78, and the Nasdaq Composite added 10.49 points or 0.33 percent, to 3,153.67.

The benchmark S&P 500 is a mere 0.35 percent away from hitting 1,500, a level not seen since Dec. 12, 2007.

Netflix shares soared 32 percent, above $136, after the video subscription service said it added subscribers in the United States and abroad and posted a quarterly profit.

Clearing a market hurdle, the U.S. House of Representatives passed a Republican-led plan to extend the country’s borrowing authority until mid May. This delays a confrontation in Congress similar to one in 2011, which generated a stalemate that triggered the first-ever U.S. debt rating downgrade.

Thomson Reuters data through Wednesday showed that of the 99 S&P 500 companies that have reported earnings so far, 67.7 percent have topped expectations, above the 65 percent average beat over the past four quarters.