NEW YORK (AP) -- Gains for technology companies, banks and energy companies are helping U.S. stocks erase an early loss and move higher Friday. Stocks are coming off their biggest loss in three months. Sporting goods makers and retailers continue to take sharp losses after investors did not like what they heard from Foot Locker and Hibbett Sports. European markets continue to decline after terrorist attacks in Spain.
KEEPING SCORE: The Standard & Poor's 500 index rose 2 points, or 0.1 percent, to 2,432 as of 12:25 p.m. Eastern time. The Dow Jones industrial average dipped 15 points, or 0.1 percent, to 21,735. The Nasdaq composite climbed 15 points, or 0.2 percent, to 6,236. The Russell 2000 index of smaller-company stocks remained at 1,359. The index has fallen 6 percent since July 25.
On Thursday stocks took their second-biggest loss of 2017. Investors were troubled by a pair of deadly car attacks in Spain, which killed a combined 14 people, and stocks in the U.S. traded lower as investors expected the Federal Reserve will raise interest rates more slowly than previously anticipated. Wall Street also became more pessimistic about President Donald Trump's proposals for infrastructure spending. Late Thursday the White House said it abandoned plans to form an infrastructure advisory council.
TURNAROUND: Stocks weakened early on and started moving higher close to noon. Technology companies made some of the biggest gains. Chipmaking equipment company Applied Materials followed up solid third-quarter results with a forecast that was stronger than analysts expected, and its stock rose $1.15, or 2.7 percent, to $44.27. Apple gained 94 cents to $158.80 and video game maker Activision Blizzard picked up 75 cents, or 1.2 percent, to $62.12.
After initial gains, bond prices declined. The yield on the 10-year Treasury note rose to 2.20 percent from 2.19 percent, which helped banks and other financial companies trade higher. Gold rose to its highest price since right before the U.S. presidential election, but later gave up most of that gain. It rose 0.3 percent to $1,295.70 an ounce.
BLOWING THE WHISTLE: Athletic gear retailer Foot Locker plunged $12.88, or 27 percent, to $34.82 percent after a weak quarter. The company said some high-priced sneakers didn't sell as well as it hoped, and there aren't a lot of exciting new shoes on the market. It doesn't expect that problem to clear up in the next few quarters. Foot Locker now plans to close at least 135 stores, up from its previous forecast of 100.
Hibbett Sports cut its annual forecasts and its stock tumbled $1.10, or 9.6 percent, to $10.40. Also falling were real estate companies that own shopping malls and other retail locations.
Sporting goods retailers and apparel makers have had a rough year, and they nosedived this week after a disappointing report from Dick's Sporting Goods. On Friday Nike sank $2.30, or 4 percent, to $55.17 and Under Armour shed 69 cents, or 3.9 percent, to $17.12.
ENERGY: Energy companies rose as benchmark U.S. crude oil jumped $1.17, or 2.5 percent, to $48.26 a barrel in New York. Brent, the international standard, added $1.40, or 2.7 percent, to $52.44 a barrel in London.
NO, DEERE: Deere tumbled after its sales in the fiscal third quarter came in lower than investors hoped. The company's profit got a large boost after the company sold some of its stake in SiteOne Landscape Supply, and analysts said they were disappointed with the company's equipment sales. The stock dropped $7.30, or 5.9 percent, to $116.68.
LOOKING GOOD: Beauty products company Estee Lauder jumped after its fiscal fourth-quarter results surpassed Wall Street's expectations. The company also gave strong forecasts for the current fiscal year. Its stock gained $7.18, or 7.3 percent, to $105.50. Competitor Ulta Beauty picked up $2.61, or 1.1 percent, to $244.04.
ROSS RISING: Discount retailer Ross Stores raised its profit forecast for the year after a solid report in its latest quarter. The stock rose $4.84, or 9.1 percent, to $58.17.
POWER UP: Power company Calpine said it agreed to be bought by Energy Capital Partners and a group of other investors. The consortium is paying $15.25 a share, or $5.5 billion, and Calpine advanced $1.37, or 10.1 percent, to $14.87.
CURRENCIES: The dollar fell to 109.31 yen from 109.67 yen. The euro edged up to $1.1746 from $1.1742.
OVERSEAS: The British FTSE 100 index declined 0.9 percent while France's CAC 40 fell 0.6 percent. Germany's DAX was down 0.1 percent. Japan's benchmark Nikkei 225 index lost 1.2 percent and the Kospi in South Korea shed 0.1 percent. Hong Kong's Hang Seng sank 1.1 percent.