IE 11 is not supported. For an optimal experience visit our site on another browser.

Stocks close near highs; S&P logs 7-day rally

The Dow and S&P 500 finished near session highs Wednesday, with the S&P logging its seventh-consecutive session in positive territory, but the Nasdaq ended lower amid Apple's sharp decline.

(Read moreStocks 'vulnerable to getting whacked': Strategist)

The Dow Jones Industrial Average soared 135.54 points to finish at 153,26.60, logging a three-day win streak, boosted by IBM and Microsoft.

The S&P 500 climbed 5.14 points to close at 1,689.13. But the Nasdaq slid 4.01 points to end at 3,725.01. So far this month, all three major averages are up more than 3 percent each.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, fell near 14.

Among the key S&P sectors, health care and consumer staples led the gainers, while utilities slipped.

Investors will be looking ahead to next week's Federal Open Market Committee meeting amid expectations that the central bank could announce a tapering of its bond-buying program.

"The Fed may still be quite dovish and give the market a taper that's on the lighter side—the consensus is around $10 billion," said Quincy Krosby, market strategist at Prudential Financial. "If the Fed comes in with something much stronger than what the markets anticipate, you're going to see Treasury yield climb and that could create a bit of uncertainty in the equity market."

President Obama addressed the nation in a televised speech from the White House on Tuesday evening, saying he would work with allies to force Syria to hand over its chemical weapons. His comments came after Damascus accepted Moscow's proposal to hand over its weapon stockpile in a bid to avoid a U.S.-led attack.Obama voiced skepticism the strategy would work, however, and urged war-weary Americans to support the use of military force if necessary.

Apple tumbled more than 5 percent a day after the tech giant unveiled two new iPhones. Disappointment over the pricing of the lower-costing iPhone 5C weighed on the company's shares, according to market watchers who said the price tag may be too high and may limit sales in key emerging markets.

BofA Merrill and Credit Suisse cut their ratings on the stock to "neutral," while at least four brokerages lifted their price targets.

(Read more: Would you buy the new low cost iPhone?)

Morgan Stanley edged higher after UBS upgraded the bank to a "buy" rating with a $33 price target, citing its increasingly wealth management-driven business model. Meanwhile, the brokerage downgraded BlackRock to a "neutral" rating, with a $280 target.

Verizon Communications officially launched a massive bond sale, offering $49 billion worth of debt in the biggest-ever corporate issue on record. The deal tops Apple's previous record of a $17-billion offering back in May. The telecoms giant will use the proceeds to replace a bridge loan used to finance its acquisition of Vodafone's stake in Verizon Wireless.

On the economic front, mortgage applications tumbled last week as rates hit their highest for the year, with refinancing activity dropping to its lowest in more than four years, according to the Mortgage Bankers Association. 

Wholesale inventories ticked up 0.1 percent in July, according to the Commerce Department, after slipping 0.2 percent in June. Economists polled by Reuters had expected a gain of 0.3 percent.

The government auctioned $21 billion in 10-year notes with a high yield of 2.946 percent. The bid-to-cover ratio, an indicator of demand, was 2.86, compared to a recent average of 2.73. 

"Bottom line, outside of Syria, we know the most important short term focus of the market is next week's FOMC meeting and we will likely get a taper but only $10 billion to $15 billion," said Peter Boockvar, managing director at The Lindsey Group. "At this reduced level, the sharp increase in interest rates over the past few months I continue to believe has priced in this Fed move and this good auction result today reflects that. This said, the QE taper is out of the bag and Treasury rallies should be sold."

The Treasury is set to auction $13 billion in 30-year bonds on Thursday.

--Follow CNBC's JeeYeon Park on Twitter: @JeeYeonParkCNBC.