Crude oil roared to its highest level of the year and equities joined in on the ride on Wednesday, though without achieving the same milestone. 

The S&P 500 was up 0.08%, the Dow Jones Industrial Average rose 0.24%, and the Nasdaq added 0.16%.

Crude oil prices rallied to their highest settlement of the year on Wednesday after a weekly inventory was better than most expected. U.S. crude inventories added 2.1 million barrels last week, according to the Energy Information Administration, less of a build than another survey from the American Petroleum Institute showing an increase of 3.1 million barrels.

Reports that Russia and a number of Organization of Petroleum Exporting Countries could meet again soon to discuss production levels also supported higher prices. Oil remained higher even after Russian Energy Minister Alexander Novak denied the reports.

West Texas Intermediate crude oil for June delivery was up 4% to $44.18 a barrel on Wednesday.

However, some analysts remain skeptical that recent highs are sustainable. 

"We continue to believe that oil will remain a source of tension for the equity market until the price of crude oil becomes stabilized as a result of a greater balance between production and consumption levels," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management. "We anticipate the current imbalance to narrow in the second half of 2016."

Sales of homes already built climbed 5.1% in March to a seasonally adjusted rate of 5.33 million as warmer weather and robust demand boosted activity in the housing sector. The increase was above expected growth of 3.7%, and the median price climbed 5.7% to $222,700.

"The overall tone of this report was encouraging, as the rebound in sales activity will likely take some of the edge from the disappointing performance in building activity, and the good news on home sales could be an indication that the housing recovery is slowly regaining its footing after the recent stumbles," Millan Mulraine, deputy chief U.S. macro strategist at TD Securities, wrote in a note.

In earnings news, Coca-Cola (KO - Get Report) reported a weaker quarter as currency headwinds continued to pressure revenue. The beverage giant reported a 4% decline in sales to $10.28 billion, falling short of forecasts of $10.29 billion. Global unit case volume rose 2%. Shares fell 4%, while the Consumer Staples Select Sector SPDR ETF (XLP - Get Report) fell 0.9%.

Yahoo! (YHOO) climbed 4.2% as adjusted earnings topped estimates. The embattled Internet company earned 8 cents a share in its first quarter, a penny higher than analysts expected. Yahoo! did not divulge any new details on its plans to sell itself, only noting that it has seen "substantial progress."

Intel (INTC - Get Report) moved 1.3% higher after announcing plans to cut 12,000 jobs, around 11% of its workforce. The tech company said the restructuring helps ease its transition into the cloud-computing business. Separately, Intel reported earnings of 54 cents a share, above estimates of 47 cents.

Donald Trump and Hillary Clinton, the presidential candidate frontrunners in their respective races, scored victories in New York on Tuesday night. Trump drew 60% of the Republican vote, securing 89 delegates, while Clinton earned 58% of the Democratic vote and 139 delegates. Connecticut, Delaware, Maryland, Pennsylvania and Rhode Island will hold the next primaries on April 26.