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:
- Emergency unemployment benefits are set to expire Friday and Congress and the White House still seem far apart on an agreement. White House Chief of staff Mark Meadows said Democratic leaders have rejected four offers regarding the coronavirus relief bill.
- Dow-component Chevron fell 2.7% after the oil giant reported an $8.3 billion loss in the second quarter as the pandemic "significantly reduced demand."
- Consumer sentiment deteriorated this month amid a resurgence in new coronavirus cases. University of Michigan's consumer sentiment index came in at 72.5 for July, down from June's 78.1 and below Dow Jones estimates of 72.7.
- Stocks linked to an economic recovery like banks and retailers were lower as investors assessed the biggest quarterly gross domestic product contraction on record and persistently weak job growth. JPMorgan and Home Depot both ended the day in the red.
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.