Stocks advanced modestly on Friday, as investors awaited a wave of key earnings reports scheduled for next week while bullish broker comments lifted tech stocks.

International Business Machines Corp led the Dow higher after Barclays Capital raised its price target to $140 from $119, and upgraded the information technology hardware sector to positive from neutral.

Separately, Deutsche Bank predicted late Thursday that semiconductor companies would report upside surprises in their earnings for the past three months.

The Philadelphia Semiconductor index <.SOXX> climbed 1.8 percent while IBM gained 2.4 percent to $125.16. Peer Dow component Intel rose 1.2 percent to $20.13.

Both IBM and Intel are scheduled to report quarterly results next week.

Everyone is playing a wait-and-see game today, said Dan Cook, senior market analyst at IG Markets in Chicago. People are expecting good things out of tech and the outlook for them is positive, but the markets have also had a big week.

The Dow Jones industrial average <.DJI> rose 36.12 points, or 0.37 percent, to 9,822.99. The Standard & Poor's 500 Index <.SPX> added 1.98 points, or 0.19 percent, to 1,067.46. The Nasdaq Composite Index <.IXIC> gained 7.76 points, or 0.37 percent, to 2,131.69.

Also lifting tech was Research in Motion , after Robert W. Baird upgraded the stock to outperform on upcoming product launches. The stock rose 0.9 percent to $69.28.

Two large merger deals attracted investor attention on Friday.

Kimberly-Clark said it plans to acquire I-Flow Corp , for $324 million, sending I-Flow shares up 7.1 percent to $12.60 while Kimberly-Clark was up 0.1 percent at $59.13.

Citigroup agreed to sell its Phibro commodities trading business to Occidental Petroleum Corp . Citi's shares fell 0.7 percent to $4.62 while Occidental's stock was down 0.7 percent at $79.52.

According to the Commerce Department, the U.S. trade gap unexpectedly narrowed in August, as trade in services pushed exports slightly higher and imports fell by a fractionally larger amount.

The S&P 500, which has climbed nearly 60 percent from a 12-year closing low in early March, was on track at midday to reverse a two-week losing streak. If the index ends in positive territory on Friday, it will be its fifth straight day of gains.

(Editing by Jan Paschal)