The S&P 500 is less than 1% from marking yet another new record high in the wake of a strong earnings season and a generally positive outlook for the second half of the year.

The S&P 500 is 22 points from surpassing its previous all-time high notched in January after rising about 2% in the last three trading sessions. Other major gauges like the S&P Mid-Cap and the S&P Small-Cap indexes are also approaching historic highs for the first time since marking peaks in January.

Amid the second-quarter earnings season, which is nearly over, companies have generally held their third- and fourth-quarter guidance. Third quarter S&P earnings are expected to rise 22.7% and fourth-quarter earnings are expected to rise 20.6%, CNBC reported, citing Thomson Reuters figures. (See also: Where to Find Bargain Stocks in the S&P 500.)

Flush with cash in part from a new tax policy, S&P companies, with revenue up about 10%, are also announcing buybacks in droves. So far this year, companies have announced a record $754 billion in buybacks, with $1 trillion expected by year end, Goldman Sachs estimates.

Stocks are also making gains on the back of a generally healthy economy, where the jobs scene is improving and U.S. GDP growth is expected to be more than 3% for the remainder of 2018.

JP Morgan technical analyst Jason Hunter said he expects the S&P 500, which closed at 2,850 on Monday, to hit a high of 2,950 as soon as late summer or early fall. He said he expects the index to blow past its record high based in part on generally lower volatility.

S&P Structural Change

The S&P 500 will undergo a major structural change in the next two months with technology giants Alphabet (GOOGL) and Facebook (FB) moving out of the technology sector and into a communications services sector so that technology stocks are less dominant.

"You're going to see a major downgrading of tech weightings in the S&P 500 when this change happens, and that's purely an illusion. That's just reclassifying the names and the sectors," DataTrek Research co-founder Nicholas Colas told CNBC.