Stocks waded further into the green on Wednesday afternoon after former FBI director James Comey's prepared testimony for Thursday was made public. Wall Street had been under pressure earlier after a major selloff in crude oil prices on Wednesday bled into the energy sector.

Stocks returned to the green by mid-afternoon Wednesday. The S&P 500 was up 0.14%, the Dow Jones Industrial Average gained 0.2%, and the Nasdaq rose 0.26%.

Comey detailed his numerous meetings with President Trump since January in his opening statement for his Thursday appearance before the Senate Select Committee on Intelligence. Comey said he had not told Trump that he would cease investigations into former National Security Adviser Michael Flynn despite Trump's request. Comey also said that Trump had said, "I need loyalty. I expect loyalty." Comey based his testimony on his recollections and a series of memos composed after several meetings. 

Following this opening statement on Thursday, Comey will answer questions from the Senate Intelligence Committee. Trump fired Comey in May while the FBI was investigating the Trump transition team's ties to Russia. News reports indicated that Trump had asked Comey for his loyalty and requested he stop investigating former National Security Adviser Michael Flynn.

Early Wednesday, Trump nominated former Justice Department official Christopher Wray as the next FBI director. Trump called Wray a "man of impeccable credentials" in his Twitter announcement. Wray previously served as assistant attorney general under President George W. Bush.

Losses in crude oil prices picked up speed on Wednesday after a surprise increase in domestic crude stockpiles. Inventories rose by 3.3 million barrels in the past week, the Energy Information Administration said, surprising analysts looking for a decrease of 3.5 million barrels. Gasoline and distillates stockpiles both increased.

If you liked this article you might like

These Stocks Pay You to Own Them

Dow, S&P 500 Set New Records as Fed Moves to Unwind Balance Sheet

Stocks In Negative Territory as Chances for December Hike Surge

Energy Stocks Lead a Neutral Market Even After Oil Inventories Spike

Energy Takes a Backseat as Crude Oil Stabilizes Under $50