Stocks were holding on to small gains in light trading Friday afternoon ahead of the Memorial Day holiday. The market was on track for its third straight gain, getting a lift from news that sales of new U.S. homes increased last month.

Hewlett-Packard, GameStop and TripAdvisor notched some of the biggest gains.

KEEPING SCORE: The Standard & Poor's 500 index gained six points, or 0.3 percent, to 1,898 as of 2:32 p.m. on Wall Street. The Dow Jones industrial average rose 51 points, or 0.3 percent, to 16,595. The Nasdaq composite added 24 points, or 0.6 percent, to 4,178. U.S. financial markets will be closed Monday for Memorial Day.

HOUSING: The Commerce Department reported that sales of U.S. new homes rose 6.4 percent in April after slumping in the previous two months. Traders were encouraged by the latest sign that the housing market may be recovering. Lennar led the sector, rising $1.35, or 3.5 percent, at $40.35.

"The market is grinding higher because things are coming in better than expected," said Karyn Cavanaugh, senior market strategist at Voya Investment Management. "The housing data today, new home sales, were better than expected. Yesterday, existing home sales, better than expected."

UPWARD TREND: Major indexes rose Thursday and have finished higher in four of the last five trading days.

The S&P 500 index, the most widely used benchmark for stock funds, has climbed 1.1 percent this week. The index moved early Friday ahead of its previous record closing high of 1,897 set early last week.

advertisement | advertise on newsday

THE OUTLOOK: "The environment is very good for stocks," said John Fox, director of research at Fenimore Asset Management. "The economy is moving ahead at a slow, but reasonable rate, and corporate earnings are fine.

Valuations are fair, but they certainly are not overblown, and we have continued low interest rates."

GROWING AND CUTTING: Hewlett-Packard reported late Thursday that its net income increased in the February-April quarter. The technology giant also announced plans to cut another 11,000 to 16,000 jobs by October as part of a multiyear restructuring plan. Shares rose $2.05, or 6.4 percent, to $33.82.

LEVEL UP: GameStop jumped $1.30, or 3.5 percent, to $38.17 after the video game seller reported earnings that were higher than analysts were expecting.

TRAVEL PURCHASE: TripAdvisor jumped 4.1 percent a day after the online travel review site finalized its acquisition of Paris-based online restaurant booking company LaFourchette. TripAdvisor's stock rose $3.69 to $94.70.

SECTOR WATCH: Eight of the 10 sectors in the S&P 500 index rose, led by consumer discretionary and materials stocks. The utilities and energy sectors fell slightly.

BONDS AND COMMODITIES: Bond prices rose. The yield on the 10-year Treasury note fell to 2.54 percent from 2.55 percent late Thursday. Crude oil rose 62 cents to $104.36 a barrel. Gold fell $3.30 to $1,291.70 an ounce.