Stocks rose to record levels on Friday as earnings season kicked off.
The S&P climbed 0.6 percent to close at 2,459.27, setting intraday and closing records. The index's previous intraday record was 2,453.82, which was set June 19.
The Dow Jones industrial average closed 84.65 points higher at 21,637.74, a record. The 30-stock index also notched an intraday record.
The Nasdaq composite outperformed the Dow and the S&P, rising 0.6 percent to close at 6,312.47.
The major indexes have overcome several hurdles recently to climb back to record territory. First, tech stocks showed signs of weakness to close out the first half of the year. Tech has been the best-performing sector this year, rising about 20 percent.
The U.S. stock market has also overcome headlines regarding Russia's involvement in the U.S. election as they awaited the start of earnings season.
"They all beat on the bottom line. There was a bit of disappointment on the guidance but overall it's been a good start to the earnings season," said Nick Raich, CEO of The Earnings Scout. He also noted that, of the 30 S&P 500 companies that have reported, 80 percent have beat on the bottom line.
Raich added these companies have shown 15 percent earnings growth and 6.2 percent sales growth. "That number compares favorably to how these companies reported last quarter."
Overall earnings are expected to grow by 6.2 percent this quarter, according to S&P Capital IQ.
The major indexes also posted solid weekly gains.
"It's a week where we could have had some land mines and we didn't," said Art Hogan, chief market strategist at Wunderlich Securities. "Janet Yellen could've been hawkish, but she wasn't. PPI, CPI and retail sales could've been disasters, but they weren't."
Dow, S&P and Nasdaq this week
Wall Street also turned its sights on economic data, with retail sales and consumer inflation for June both disappointing.
Mark Newton, managing member at Newton Advisors, said in a note the "lack of inflation remains a concern," adding "potentially Yellen's Dovish stance was correct."
Earlier this week, Federal Reserve Chair Janet Yellen signaled that future rate hikes will be gradual. Her remarks lifted the Dow to a record.
Stock futures and Treasurys ticked higher following the data releases.
"Every time bond yields go down the stock market ticks up, it seems," said Bruce Bittles, chief investment strategist at Baird. "I hate to use the term 'Goldilocks' but we do have an economy that's growing but at a slow pace."
The benchmark 10-year yield briefly broke below 2.3 percent earlier on Friday.