The Federal Reserve confirmed it: The U.S. economy is doing far better now after a shaky couple of months earlier in the year. 

Easing worries over the economy helped to pull stocks out of the red in the final hour on Tuesday. But the gains were short-lived with the S&P 500 and Dow Jones Industrial Average succumbing to gravity in the closing mintues. 

The S&P 500 closed 0.12% lower, the Dow was flat, and the Nasdaq rose 0.6%.

The S&P 500 had spent much of the day prior to the Fed announcement in negative territory on disappointing earnings from Twitter (TWTR) - Get Report and Coca-Cola (KO) - Get Report and another selloff in crude. 

The Fed opted to leave rates unchanged at its July meeting, as expected. The vote to hold rates as is was nearly unanimous, save for the sole vote from Kansas City Fed President Esther George who voted to raise rates.

The Fed touted improvements to the economy in a statement following the conclusion of its two-day meeting. Increasing confidence in the economy was taken by some as a signal of the central bank's openness to a possible move on rates in September.

"Near-term risks to the economic outlook have diminished," the central bank said in its statement. "Information received since...June indicates that the labor market strengthened and that economic activity has been expanding at a moderate rate."

The likelihood of a move on interest rates in July was low heading into the meeting. A rate hike in July had only a 3% probability, according to CME Group Fed funds futures. 

"The Fed delivered a fairly nuanced message in the July statement, offering only modest changes to reflect the relatively upbeat tone in the economic data, while signaling that the near term downside risks might have eased," said Millan Mulraine, deputy chief U.S. macro strategist at TD Securities. Mulraine does not expect a rate hike this year. 

Apple (AAPL) - Get Report  was one of the best performers on markets Wednesday after clearing low expectations in its recent quarter. The number of iPhones sold dropped 15% from the year-ago quarter, but exceeded estimates. The tech giant shocked markets in its previous March-ended quarter after reporting a drop in overall company sales for the first time in 13 years and a fall in iPhone sales for the first time ever.

Apple's services segment, which includes iTunes, Apple Music, Apple Pay, was a bright spot with revenue rising 19% to $6 billion.

"We are encouraged by what has the makings of momentum in high-profit, high-growth and highly predictable recurring revenue streams, most prominently the company's Services business, which includes iCloud, data usage, App Store (and associated licensing/royalties), along with Apple Music, Apple Pay and Apple Care, said Jim Cramer, TheStreet's founder and manager of the Action Alerts PLUS portfolio, and AAPL Research Director Jack Mohr. The Action Alerts PLUS portfolio owns Apple.

Coca-Cola slipped 3.3%, weighing on the S&P 500, as currency fluctuations impacted its top line over the second quarter. The beverage industry leader reported a 5% decline in sales to $11.54 billion, $100 million short of estimates. Currency exchange reduced sales by 3%. Organic revenue, excluding the impact of forex, rose 3% over the quarter.

Twitter sank 14.5% after reporting disappointing second-quarter sales and a softer third-quarter outlook. The social network reported a nearly 20% increase in revenue to $601.96 million over the quarter, coming in slightly below expectations. The company said it expects third-quarter revenue no more than $610 million, well below expectations of $678 million.

"We believe the company is well on its way to spiraling out of control, and view its inability to engage users, monetize content or suppress executive turnover as reasons to avoid an investment in the name at all costs," said Cramer and Mohr. Twitter shares represent less than 0.5% of the Action Alerts PLUS portfolio.

Crude oil tumbled after an unexpected rise in weekly inventories. The number of barrels of crude in U.S. stocks rose by 1.7 million, according to the Energy Information Administration. A separate read from the American Petroleum Institute overnight had showed a decline of 827,000 barrels.

West Texas Intermediate was down 2.3% to $41.92 a barrel on Wednesday, its lowest settlement since mid-April.