The stock market lost ground on Thursday, but declines in the major benchmarks were relatively modest as low levels of volatility continued to prevail. The Dow had been down as much as 145 points earlier in the day as investors weighed the possibility that the controversial firing of FBI Director James Comey could set back the Trump administration's domestic agenda for tax cuts, health reform, and immigration. In addition, bad news among several major retailers weighed on market sentiment.

But some stocks managed to buck the trend and give investors more upbeat outlooks for their prospects. SandRidge Energy (NYSE: SD), MBIA (NYSE:MBI), and LivePerson (NASDAQ:LPSN) were among the best performers on the day. Below, we'll look more closely at these stocks to tell you why they did so well.

SandRidge gives investors a good report

Shares of SandRidge climbed 10% after the company reported its first-quarter financial results. The energy company said that it earned a profit of $50.8 million, which worked out to $1.90 per share, reversing a loss in the year-ago period prior to SandRidge's emergence from bankruptcy in late 2016. SandRidge produced 4 million barrels of oil equivalent during the quarter, half of which was dry natural gas and the remainder split between crude oil and natural gas liquids. Lifting costs rose slightly during the quarter, but SandRidge continued to benefit from efforts to improve operating efficiency. In total, the energy company expects to produce between 14 million and 14.7 million barrels of oil equivalent during 2017, and it's working hard to minimize discounts compared to West Texas Intermediate crude and Henry Hub spot natural gas prices and reap the most in profit that it can.

Oil rig, pipe, and other materials.

Image source: Getty Images.

MBIA sees a narrower loss

MBIA stock rose 10% in the wake of favorable results in the company's first-quarter financial report. The bond and mortgage insurance provider said that it suffered a narrower net loss than in the prior-year quarter, and earned premium fell by a third, while an improving foreign exchange picture helped cushion the blow to the bottom line. COO Bill Fallon noted that MBIA's national business has continued to expand, with a presence in more than half of the 50 states in the U.S. and adding seven in just the past quarter. With a strengthening capital position and smart risk management in terms of adding new underwriting risk, MBIA is working hard to mount the disciplined comeback that will be vital in ensuring a prosperous future for the company and its shareholders.

LivePerson looks forward

Finally, shares of LivePerson soared 23%. The cloud-based customer service solutions specialist said that sales fell 8% from the year-ago quarter, and income declined to just $0.01 per share on an adjusted basis. Yet investors were prepared for steeper revenue declines, and LivePerson boosted its guidance for the full year, raising the lower end of range and now calling for $204 million to $209 million. With new clients signing up from across the globe and several increases in business activity with existing clients, LivePerson is doing a good job of building up its top-line prospects. Now, greater attention to promoting internal efficiency could be the best way to ensure maximum profitability for LivePerson going forward.

Dan Caplinger has no position in any stocks mentioned. The Motley Fool recommends LivePerson. The Motley Fool has a disclosure policy.