The U.S. stock market shook off morning blues and picked up steam in late-afternoon trading with the main benchmarks venturing into positive territory.

The main indexes were still on track for weekly losses, however.

The S&P 500 (SPX) was up 3 points, or 0.1% at 1,967.31. The Dow Jones Industrial Average (DJI) ticked up 26 points, or 0.2% to 16,941.46.

The Nasdaq Composite (RIXF) was 18 points, or 0.4%, higher at 4,414.78 but still on track for a week of steep losses.

Follow MarketWatch's live blog of Friday's stock-market action.

Kim Caughey Forrest, senior equity analyst at Fort Pitt Capital, explained the reason behind shallow pullbacks: "There are lots of investors with cash who missed out on spectacular gains in 2013, so every time they see a dip, they are buying it. I suspect that often it is a retail investor, because institutional investors are more disciplined," Forrest said.

Banking heavyweight Wells Fargo & Co. (WFC) kicked off the reporting season for the financial sector with headline earnings that were in line with expectations. The stock was 0.3% lower as analysts delved into the details.

Amazon's (AMZN) stock climbed 5.5%. The company unveiled new products for its successful Amazon Web Services business, including new systems for collaboration and mobile.

Tobacco giant Reynolds American Inc. (RAI) confirmed it is in talks with Lorillard Inc. (LO) about a possible acquisition. Lorillard shares rose 5.5%.

Mortgage insurers, including Genworth Financial Inc.(GNW), fell in response to new proposed capital requirements by the Federal Housing Finance Agency. Genworth slid 2.1%.

Fastenal Co.(FAST), which makes fasteners, tools and other industrial and construction supplies, fell 4.4% in the wake of second-quarter earnings.

An influential broadcaster in China said the location-tracking function in Apple Inc.'s (AAPL) iPhone was a "national security concern," in the latest backlash against U.S. tech firms. Read about more of the day's notable movers here.

Fed speakers

"The Federal Reserve should consider hiking rates in response to the improving outlook," Charles Plosser, president of the Philadelphia Fed, said Friday. "We should not be keeping rates at zero until we meet all our objectives," Plosser said in an interview on Bloomberg TV. Plosser is known as a hawk and is a voting member of the Fed's policy committee this year.

At 3 p.m. Eastern Time, Charles Evans, the president of the Chicago Fed, and Dennis Lockhart, president of the Atlanta Fed Bank, will be on a panel about success and failures of Fed policy. Lockhart has said he expects short-term rates will be held at zero until the latter half of 2015, while Evans has said it may not be until 2016 that the Fed starts on its rate-hike path. Evans and Lockhart are not voting members on the policy committee this year.

European stocks bounce, oil drops

In overseas markets, European stocks bounced back Friday after Thursday's drop, which came as Portuguese conglomerate Espírito Santo International SA this week missed a payment on some short-term debt. That sent shares of its subsidiaries, Banco Espirito Santo AS and Espirito Santo Financial Group SA, spiraling lower.

Overnight in Asia, Japan's Nikkei Average fell 0.3% and Hong Kong's Hang Seng Index ended flat.

Among commodities, crude for August delivery (CLQ4) fell $2, or 1%, to $100.81 a barrel. August gold (GCQ4) fell $2 to $1,337.3 an ounce.