Wall Street closed out Wednesday's session with modest gains thanks to a rally in crude oil that pushed West Texas Intermediate to its highest close since it hit $51.61 in July 2015. 

The S&P 500 was up 0.22%, the Dow Jones Industrial Average also climbed 0.22%, and the Nasdaq increased 0.05%.

Crude oil prices jumped on Wednesday on signs of falling domestic production. A weekly reading on domestic inventories from the Energy Information Administration showed a decline of 5.2 million barrels. Inventories have fallen six times in the past seven weeks. A separate reading from the American Petroleum Institute showed a decline of 3.8 million barrels in the week ended Oct. 14.

China's crude production fell 9.8% to 3.89 million barrels per day in September, its second-largest year-on-year drop ever. Current levels are at their lowest in six years. Low crude prices have driven many Chinese producers to lower production.

Upbeat comments from Saudi Arabia, one of the largest producers in the Organization of Petroleum Exporting Countries, also boosted prices. Saudi Arabian Energy Minister Khalid al-Falih said that oil has reached the end of a downturn and that supply-demand forces were beginning to rebalance. al-Falih also called on non-OPEC producers to help to limit production as OPEC does their part.

West Texas Intermediate crude oil closed 2.02% higher at $51.64 a barrel on Wednesday. Its previous best in 2016 was $51.23 on June 8.

The energy sector was the top performer on Wall Street Wednesday, led by Halliburton (HAL) - Get Report which swung to an unexpected quarterly profit. The oil-services company earned an adjusted 1 cent a share over the quarter, up from a loss of 6 cents a share in the year-ago quarter and better than an estimated loss of 6 cents a share. Halliburton said it remains "cautious around fourth quarter customer activity due to holiday and seasonal weather-related downtimes."

The latest "Beige Book" release from the Federal Reserve reported a "modest to moderate" rate of growth in the U.S. economy from late August to early October, a trend the Fed expects to continue. Most regions reported economic growth, particularly in the St. Louis, Kansas City and Dallas districts, while New York reported no change in activity.

The U.S. districts reported that labor market conditions remained tight with "modest employment and wage growth" reported over the period. Manufacturing activity was mixed with a strong U.S. dollar dampening demand for exports. The anecdotal read on economic growth over a six-week period provides insight into economic activity in the 12 Fed districts.

Morgan Stanley (MS) - Get Report rose by 1.8% as trading revenue drove the bank to beat estimates in its third quarter. Bond-trading revenue increased 61% over the quarter, its largest gain among the Wall Street banks already reported, as investors played the market on speculation over the next interest rate hike. Profit of 81 cents a share breezed past estimates of 63 cents.

Intel (INTC) - Get Report exceeded earnings estimates in its third quarter after posting a 21% increase in net profit and 9% jump in revenue. However, shares tumbled 6% after guiding for a below-consensus fourth quarter. The tech company anticipates fourth-quarter revenue of $15.7 billion with a $500 million buffer on either side, below an estimated $15.86 billion at consensus' midpoint. Intel pointed to costs tied to accelerating production of new memory products and factory startup costs associated with 10-nanometer manufacturing.

Yahoo! (YHOO)  jumped by 2.5% after topping earnings estimates in its third quarter. The Internet company earned an adjusted 20 cents a share over its recent quarter, 6 cents above forecasts. Revenue rose nearly 6% to $1.31 billion, in line with consensus. After subtracting advertising commissions, Yahoo!'s revenue in the quarter fell 14% to $857 million, its fourth straight quarter with declines of at least 10%. Verizon (VZ) - Get Report is set to purchase Yahoo! for $4.8 billion after announcing a deal in July, though some have called its likelihood into question after a recently disclosed data breach that impacted more than 500 million accounts.

Seagate (STX) - Get Report fell 2.7% after warning of increasing expenses in its first quarter. The hard-drive manufacturer expects operating costs to increase to $580 million in its first quarter despite continued cost-cutting measures. Expected higher expenses were tied to performance-based compensation costs.

So far, nearly 15% of S&P 500 companies have reported their quarterly earnings this season. Of those that have reported, 80% have reported earnings above consensus. Thomson Reuters analysts anticipate third-quarter blended earnings growth of 0.5%, snapping a five-quarter string of earnings in decline.

Housing starts slid in September as activity fell back from recent highs. Builders began construction on 9% fewer homes last month, the slowest pace since March 2015. Housing starts moved lower to an annual 1.047 million pace, weaker than consensus of 1.18 million. Weakness was driven by a 38% decline in multi-family starts, bottoming at a three-year low, while single-family housing starts jumped more than 8%. Building permits jumped 6.3%, a positive sign of future strength.