It has been a tough month for oil and gas refiners. Many of the leading companies in the sector have seen large sell-offs. The news that the Commerce Department opened up the "floodgates" for U.S. oil exports drove this sell-off. However, in truth, it was merely a slight tweak of the law, allowing two companies to export lightly refined crude oil.

Marathon Petroleum Corporation (MPC 0.71%), Holly Frontier Corporation, and Valero Energy Corporation (VLO 0.99%) are all down over 7% for the last month. The one bright spot is Western Refining (WNR), which is actually up 2% over the last month. But are all of them worth buying on this weakness?

How shares stack up
After the sell-off, some of the major refiners will likely attract value investors. Some of the most notable ideas include Valero and Marathon Petroleum. The two trade as a couple of the cheapest stocks in the industry on a forward (based on next year's earnings estimates) P/E basis. Each trades at a forward P/E of under 8, while Holly Frontier trades at a forward P/E ratio of 9.4 and Western Refining's ratio is 9.3.

They are still very solid businesses, companies that are fundamental to refining oil into gasoline and lubricants. The refiners have been enjoying the Brent and West Texas Intermediate oil price spread. They are buying oil for cheap at WTI prices, refining it, and then selling it for higher prices in international markets at Brent prices.

With U.S. oil and gas production still on the rise, refiners should continue benefiting. The large amounts of oil being extracted thanks to fracking and new drilling techniques still can't be exported, leaving plenty of business for the U.S. refiners.

Citi Financial recently came out and noted their bullishness on the industry. They are looking at the long-term prospects of the industry, with production of U.S. oil expected to continue growing. The firm notes the "sticky" nature of oil prices (meaning there's little fluctuation) due to Middle East volatility, which is a positive for refiners.

The best refiners to invest in
Marathon is one of the best picks in the industry after completing a number of acquisitions and repurchasing more than $3 billion worth of shares in the last two years. It also offers a 2.2% dividend yield. As far as acquisitions go, earlier this year Marathon Petroleum acquired Hess' retail operations. This included its transportation and shipping ability on various pipelines.

Valero has big potential thanks to its position in the Gulf Coast, where the competition leads to greater discounts on crude oil, boosting its margins. New pipelines and rail investments will also help bring more oil to the Gulf Coast, another big positive for Valero, where half of its refining capacity is located along the Gulf Coast. As well, its key refiners are located close to the booming Eagle Ford shale. Valero offers the smallest dividend yield of all the stocks listed, however, coming in at 2%.

Western Refining is actually restructuring itself as holding company that will own limited and general partnership interests in Northern Tier Energy and Western Refining Logistics. This setup will give Western Refining a lot more flexibility with its operations. This includes the potential to shift some of its exposure from refining to retail and logistics. The holding company structure that Western Refining is pursuing is something that the likes of Williams Companies and Spectra Energy have both used, allowing them to boost dividend yields. Western Refining's dividend yield is 2.6%, compared to Williams' yield of 2.9% and Spectra's 3.2%.

Bottom line
Overall, the refiners appear to be offering investors a compelling entry point. The future of the industry looks bright, thanks in part to the stabilization of international oil prices, but also because new drilling techniques are bringing to market more and more oil to be refined. For investors looking for exposure to the bustling refinery business, Valero and Marathon Petroleum are worth a closer look.