U.S. stocks suffered a third straight late-day sell-off on Wednesday, suggesting it may be difficult to chalk further gains as the year comes to a close.

After hitting two-year highs this week, a sustained rise in Treasury yields has sparked worry that rising borrowing costs could stifle the recovery. Banks, heavily dependent on loan demand, faded and ended lower for a third straight day. The sense among investors is that the market, after rising almost 11 percent so far in 2010, has run its course for the year.

There are signs that the market is making a top at these levels, and people are starting to take profits, said King Lip, chief investment officer at Baker Avenue Asset Management in San Francisco. Because the trading volume is low, I think this is temporary; the rally probably still has room to go.

Major averages and stocks that have led the rally have exhibited a familiar pattern in recent days, spiking early and succumbing to selling late as investors see stocks hitting resistance.

Apple Inc ended the day flat at $320.36, up just 0.02 percent after rising as high as $323 earlier in the day. Netflix Inc closed nearly flat, up just 0.03 percent at $178.50 -- off its high of $181.42.

Judy Moses, a San Francisco-based portfolio manager at Evercore Wealth Management, which has about $2.3 billion in assets under management, said that seasonal issues related to the end of the year could be affecting traders.

Managers don't want to show high cash balances after such a strong year, but at this point, they also want to lock in gains, she said.

The Dow Jones industrial average <.DJI> slipped 19.07 points, or 0.17 percent, to 11,457.47. The Standard & Poor's 500 Index <.SPX> shed 6.36 points, or 0.51 percent, to 1,235.23. The Nasdaq Composite Index <.IXIC> dropped 10.50 points, or 0.40 percent, to close at 2,617.22.

Earlier, the Dow hit a fresh 52-week high intraday at 11,519.04.

Sentiment on the volatile day started lower after Moody's warned Spain its debt rating could be downgraded, bringing concerns about the euro-zone debt crisis back to the forefront and lifting the dollar, which has had a strong inverse relationship with equities of late.

However, those concerns were later offset by positive U.S. data on industrial production and regional manufacturing. The data boosted stocks going into the afternoon, but markets were unable to hold those gains.

Industrial production rose in November at its fastest pace in four months, implying that a self-sustaining recovery is now entrenched. An index of manufacturing activity in New York rebounded strongly, adding to the brighter picture.

We're going into the end of the year and just hit a two-year high, so even though macro data has been better, things haven't perked up so much to lift us farther from here, said Adrian Cronje, chief investment officer at the Atlanta-based Balentine, which has about $800 million in assets under management.

Honeywell International Inc fell 1.9 percent to $51.54 after it gave a 2011 profit growth outlook that analysts described as conservative.

Caterpillar Inc rose 1.1 percent to $93.08 after RBC raised its price target to $108 from $98.

A deal that President Barack Obama struck with Republicans to extend the Bush-era tax rates sailed through the U.S. Senate on Wednesday and will soon head to the House of Representatives, where it could face steeper opposition, though it is still expected to pass.

About 7.82 billion shares traded on the New York Stock Exchange, the American Stock Exchange and the Nasdaq, well below the year's daily average of 8.62 billion.

Almost two stocks fell for every one that rose on the New York Stock Exchange, while on the Nasdaq, about 16 stocks fell for every 11 that rose.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)