NEW YORK - U.S. stocks set more records in quiet postholiday trading Friday, as technology companies again did much of the heavy lifting. Energy companies rose with the price of oil.

The Standard & Poor's 500 index rose 5.34 points, or 0.2 percent, to 2,602.42. The Dow Jones industrial average added 31.81 points, or 0.1 percent, to 23,557.99. The Nasdaq composite gained 21.80 points, or 0.3 percent, to 6,889.16. The Russell 2000 index of smaller companies climbed 2.40 points, or 0.2 percent, to 1,519.16.

The Dow finished slightly below its record high from Tuesday but the other major indexes closed at all-time highs. Trading ended early after the Thanksgiving holiday on Thursday.

Macy's CEO Jeffrey Gennette told CNBC holiday shopping was off to a good start with relatively few discounts and strong sales of some especially profitable products like winter clothing. Macy's gained 44 cents, or 2.1 percent, to $21.07 and other department stores climbed as well.

U.S. benchmark crude rose 93 cents, or 1.6 percent, to $58.95 a barrel in New York. Brent crude, used to price international oils, added 31 cents to $63.86 a barrel in London.

The dollar rose to 111.55 yen from 111.17 yen. The euro climbed to $1.1925 from $1.1822.

Gold fell $4.90 to $1,287.30 an ounce. Silver lost 12 cents to $16.99 an ounce. Copper rose 3 cents to $3.17 a pound.