Insuring mortgages can be a risky but rewarding business. Image source: Getty Images.

On Tuesday, the stock market saw a break in its recent upward momentum, and major market benchmarks finished the day mixed. The Dow finished with modest gains to set another all-time record high, but the broader S&P 500 fell from its high-water mark set yesterday. Investors were somewhat nervous after some negative quarterly financial reports from major U.S. companies threw cold water on what had been an auspicious start to earnings season, and uncertainties about the future direction of the global economy were enough to cause at least a short pause in stocks' record run. However, some stocks still managed to keep up their positive momentum, and MGIC Investment (MTG -0.62%), Dexcom (DXCM 2.19%), and F5 Networks (FFIV 0.46%) were among the best performers on the day.

MGIC gets good news from the mortgage world

MGIC Investment rose 7% after the mortgage insurance specialist reported solid results in its second-quarter financial report. The mortgage insurer said that mortgage policy sales rose 10% during the quarter, but more importantly, costs of claims fell by roughly half. With the housing market having supported higher prices, fewer properties have left borrowers underwater on their mortgages, and that has helped reduce the need for MGIC to pay out on policies in the event of default. In addition, favorable data from the Commerce Department showed that new-home construction rose at a nearly 5% rate in June, which was faster than expected and pointed to the continued strength of the housing market. As long as the health of housing stays strong, MGIC will be in a position to work off potentially problematic policies and write new business that stands a better chance of avoiding future losses.

Dexcom hopes for a favorable FDA review

Dexcom gained 6% as investors speculated about the chances that the company will approve a change in intended use of one of its medical products. The company issued a press release on Tuesday saying that the Food and Drug Administration had published briefing documents in advance of this Thursday's planned meeting of a panel of its Medical Devices Advisory Committee that concentrates on clinical chemistry and toxicology devices. Dexcom hopes that the panel will recommend approval of its premarket approval application supplement, with which it proposes to allow patients to use its G5 Mobile CGM System to make diabetes treatment decisions based on reported concentrations of glucose in interstitial fluid. Investors can expect further comments from Dexcom on Friday morning at a conference call to discuss what happens at the meeting, but investors are already excited about the potential for faster growth from the San Diego-based medical device maker.

Could F5 Networks get bought out?

Finally, F5 Networks gained 4%. The networking specialist could be the latest reported target of private equity investors at Thoma Bravo, according to reports from the New York Post. F5 struggled during the last half of 2015 and early 2016, but the stock posted sizable gains recently as the company has reportedly worked with investment bankers to try to field acquisition offers and determine which might be the best fit for F5. With the lack of any definitive confirmation from F5, investors need to realize that at this point, there could be serious consequences if the networking company doesn't manage to find a buyer in the near future.