U.S. stocks closed high on Friday after a half-day session, with major gains by tech companies like Amazon leading the trend.

The Dow Jones Industrial Average gained 31.81 points (0.14 percent) to 23,557.99, while the Nasdaq closed at 6,889.16 after gaining 21.80 points (0.32 percent), with Visa and Macy's respectively leading the best-performing stocks.

The S&P 500 gained 5.34 points (0.21 percent) to close at 2,602.42. Shares in Amazon, Inc. gained 2.6 percent on Friday after reports of strong online sales for the major retailer, marking the company's third-straight record close.

ADVERTISEMENT

MarketWatch reports that total online spending on Thanksgiving Day rose 18 percent over 2016 to $2.87 billion, while online Black Friday sales had reached $640 million by 10 a.m. Friday morning.

President Trump praised a strong stock market showing on Thursday in a tweet sent from his Florida resort, Mar-a-Lago.

"HAPPY THANKSGIVING, your Country is starting to do really well. Jobs coming back, highest Stock Market EVER, Military getting really strong, we will build the WALL, V.A. taking care of our Vets, great Supreme Court Justice, RECORD CUT IN REGS, lowest unemployment in 17 years....!" Trump tweeted Thursday.