"We're seeing improving sales and improving earnings and the market is reacting to that. In the short term, I expect that to continue. This is a trend, and you don't want to get in front of that," said Brad McMillan, chief investment officer at Commonwealth Financial, who views valuations are a longer-term concern.
"There has been a tailwind behind the market for some time -- not irrational exuberance -- but as things continue to be less worse, regarding the economy and corporate earnings, so we have this relentless climb," said Erik Davidson, deputy chief investment officer for Wells Fargo Private Bank.
Shares of Facebook wavered in after-hours trading as the social media site reported revenue increased 61 percent in the second quarter on demand for its mobile ads.
Read MoreFacebook earnings beat
Apple shares rose, a day after the iPhone maker posted profits that beat expectations. Microsoft shares rose after the software giant reported better-than-expected revenue.
"Technology is having a great day. With the horde of cash on balance sheets that can be returned to shareholders through dividends, on M&A and capital expenditures; the tech sector should benefit from that over time," Davidson added.
"Overall, the market is still on a positive trajectory, but there is still some concern about growth going forward, the Federal Reserve and geopolitical events," said Robert Pavlik, chief market strategist at Banyan Partners.
Boeing turned lower after the aerospace giant reported quarterly profit and hiked its full-year forecast. PepsiCo rose after the beverage maker reported revenue that topped expectations.
"For Boeing, there are a couple of overshadowing concerns on the go-forward basis. They had a very good quarter in terms of orders, et cetera. But if we have a geopolitical situation, that could go one way or another for them," said JJ Kinahan, chief strategist at TD Ameritrade.