It's always a bit strange when a holiday falls in the middle of the week, and with the Fourth of July coming tomorrow, many expected Monday's trading session to be lacking in excitement. However, market participants once again noted the disparities between different segments of the market, as the Dow Jones Industrials soared about 130 points even as the Nasdaq gave up almost half a percent.

Positive momentum from past sessions in some stocks continued to help push them higher, and Bankrate (NYSE:RATE), Diamond Offshore Drilling (NYSE:DO), and Teekay (NYSE:TK) 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.

Bankrate makes a deal

Shares of Bankrate climbed more than 8% after the financial website company agreed to a takeover bid. Digital consumer choice platform Red Ventures made an offer for Bankrate, giving shareholders $14 per share in cash in a deal that values the overall company at $1.4 billion. The two companies believe that the combination will bring together the strengths of both businesses. Red Ventures uses data analytics and integrated technology to bring together consumers and brands in the financial, housing services, and healthcare fields. Given that Bankrate already has a vast knowledge base in the financial arena, its connections will be quite valuable for Red Ventures. The buyout brings to an end investors' hopes to share in faster growth ahead, but it also gives shareholders who've suffered the ups and downs in the stock a quick potential exit.

Diamond Offshore rig.

Image source: Diamond Offshore.

Diamond Offshore hopes for higher prices

Diamond Offshore Drilling stock gained 6% in the wake of a solid day in the energy markets. Crude oil prices moved higher as market participants hope that a recent downturn for the oil market will finally give way to a sustained and permanent move above the $50-per-barrel mark. Diamond wasn't the only winner in the space, as most of its competitors also gained ground. Bullish investors hope that the supply-and-demand picture in crude will finally start balancing out more favorably for producers, allowing prices to increase and making more offshore projects economically feasible. Yet so far, market fundamentals haven't worked out the way many expected, and it's taken a lot of effort just to prevent more dramatic declines than what investors have seen. It's entirely possible that another move downward for crude will reverse Diamond Offshore's recent gains.

Teekay ships it

Finally, shares of Teekay rose 17%, adding to recent gains. The move brought Teekay's rise in just the past couple of weeks to more than 50%, with positive sentiment stemming from an analyst's view of the shipping stock as being particularly promising. Teekay has a wide array of out-of-favor businesses that range from liquefied natural gas and tanker ships to offshore drilling equipment, and with the energy markets having been uncooperative, the stock has taken big hits since January. Less optimistic investors fear that Teekay might be financially vulnerable, especially in the offshore equipment arena when existing contracts expire and are subject either to renewal or to trying to find new takers. Until oil prices bounce back, Teekay could have trouble maximizing its potential.

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