India, Dec. 21 -- Stocks gained ground on Wall Street Friday for a second straight day, wiping away losses from earlier in the week. Technology stocks were once again the main force behind the market's broader moves, especially companies with a focus on artificial intelligence. Both the S&P 500 and the Nasdaq closed out the week with gains, despite several stumbles early this week.

The S&P 500 rose 59.74 points, or 0.9%, to 6,834.50. It notched a 0.1% gain for the week. The Dow Jones Industrial Average rose 183.04 points, or 0.4%, to 48,134.89. The technology-heavy Nasdaq made the biggest move. It rose 301.26 points, or 13%, to 23.307.62 and notched a 0.5% gain for the week.

Nvidia was the biggest force driving the market higher, with a...