The Dow Jones Industrial Average rose 114.67 points, or 0.4%, to 26,428.32 after dropping about 300 points at its low of the day. The S&P 500 climbed 0.7%, or 24.90 points, to 3,271.12, while the Nasdaq Composite gained 1.4%, or 157.46 points, to 10,745.27, led by a 10% jump in Apple shares.
The major equity averages also wrapped up the month of July with solid gains and posted their fourth straight positive month. The S&P 500 gained 5.5% in July, while the Dow and the Nasdaq Composite rose 2.3% and 6.8%, respectively.
Still, a few negative headlines capped the gains in the broader market Friday:
Apple reported a blowout quarter, sending shares up 10.4% to a new all-time high. The company said its overall sales expanded by 11%, and it also announced a 4-for-1 stock split. With Friday's rally, Apple took over Saudi Aramco to become the world's most valuable company.
Amazon, meanwhile, jumped 3.7% as the company saw its sales skyrocket during the coronavirus pandemic. Facebook shares rallied more than 7% as the social media giant posted revenue growth of 11% even amid the coronavirus pandemic slowdown.
Google-parent Alphabet also posted better-than-expected earnings, but the company's overall revenue declined for the first time in its history. Revenue for Google Cloud were also just below analyst expectations. Alphabet shares fell more than 3% on Friday.
"Obviously, no one was doubting any of those companies so the fact they all exceeded expectations isn't exactly shocking," Adam Crisafulli of Vital Knowledge, said in a note Friday. "Investors are now trying to smooth out some of the numbers (i.e. how much of the monster upside was a function of extremely conservative guidance along w/an unsustainable spike in revenue and decline in expenses?)"
Big Tech has been the stalwart on Wall Street this year. Amazon and Apple are up 71% and 44%, respectively, in 2020. Facebook and Alphabet have risen double digits over that time period.
Meanwhile, investors continued to flock to safe-haven assets amid the uncertainty about the economic recovery. Gold futures spiked to an all-time high of $2,005.4 an ounce on Friday, crossing the $2,000 mark for the first time.
— CNBC's Patti Domm contributed to this report.
Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world.