The Nasdaq closed at a fresh record, up 0.15%, to 5,682.45, and the S&P 500 held onto gains in afternoon trading Wednesday as oil prices rebounded and financial shares slumped. The Dow stayed in negative territory throughout the day.

West Texas Intermediate crude oil settled up 0.3%, to $52.34 a barrel, despite the Energy Information Administration reporting that crude inventories for the week ended Feb. 4 increased by 13.8 million barrels, much more than than expected. A week earlier, crude inventories rose by 6.5 million barrels.

Cognizant Technology (CTSH - Get Report) rose more than 4% after the information technology company announced it reached a cooperative agreement with activist investor Elliott Management and will appoint three new independent members to its board. Meanwhile, Nordstrom (JWN - Get Report) rose after slumping earlier Wednesday when Donald Trump tweeted, "My daughter Ivanka has been treated so unfairly by @Nordstrom." The retailer announced last week that it was dropping Ivanka Trump's accessory and clothing lines because of poor performance.