The Dow Jones industrial index rose 1.2 percent, the technology-heavy Nasdaq composite index increased 1.0 percent, and the broad S&P 500 index went up 1.1 percent.
Four of the seven major technology companies, often referred to as "the magnificent seven", performed well.
Alphabet, Apple, and Amazon rose 0.7-1.9 percent. But the best performer among them was AI-hyped semiconductor company Nvidia, which climbed 3.1 percent.
One reason for the optimism was economic statistics released on Friday. The figures suggested that inflation may not be as high as feared, which in turn gave hope that the central bank, the Federal Reserve (Fed), would further lower the country's interest rate.
The increase also meant that the Dow Jones industrial index broke a period of ten days of decline – the longest since 1974, writes CNBC.
Friday has calmed people down, says Tom Fitzpatrick, CEO of brokerage firm RJ O'Brien.
For the week as a whole, the Dow Jones industrial index fell 2.3 percent, the S&P 500 lost 2.0 percent, while the Nasdaq composite index dropped 1.8 percent, according to the AP news agency.