Last year was an awful one for refining companies. Rising oil prices, elevated petroleum product stockpiles, and high environmental compliance costs squeezed refining margins. As a result, adjusted earnings in Phillips 66's (PSX -1.83%) refining segment plummeted from $2.5 billion in 2015 down to a mere $277 million last year. That said, last year's beatdown is one of the many reasons why the company's stock looks like an attractive buy right now.

1. Shares are attractively priced

The tough refining market has kept a lid on Phillips 66's stock price. Over the past year, shares are virtually flat, though they are down 9% since the start of 2017. However, at the current price of around $78.50 per share, the stock looks like a pretty good bargain. That's because it's the price that Warren Buffett's Berkshire Hathaway (BRK.A -1.05%) (BRK.B -0.83%) has loaded up on shares in the past. Last year, for example, Berkshire Hathaway bought more than 18 million shares for $1.39 billion, or roughly $77.23 per share. Before that, the company spent more than $4 billion to buy about 55.4 million shares at an average price of $78.67 apiece. These prior purchases suggest that today's price represents a fair value for a great company -- at least in Berkshire Hathaway's estimation.

Petroleum product storage tanks reflecting on the water.

Image source: Getty Images.

2. Several major growth projects are nearing completion

Phillips 66 has spent the past few years working to reduce its exposure to the volatile refining market by investing billions in building out its midstream and chemicals segments. Those investments are starting to pay off now that projects are entering service. For example, Phillips 66 owns a 25% stake in the $4.8 billion Bakken Pipeline, which will ship oil from North Dakota to the Gulf Coast once it goes into service next quarter. In addition to that, its MLPs Phillips 66 Partners (PSXP) and DCP Midstream (DCP) have several growth projects under way that should drive earnings growth in 2017 and beyond. Finally, the company's chemicals joint venture with Chevron (CVX -0.83%) is putting the finishing touches on a major Gulf Coast petrochemicals expansion that should increase the Chevron-Phillips 66 joint venture's capacity by one-third. As these growth projects come online, it will not only increase Phillip 66's cash flow but reduce its earnings volatility.

3. A dividend increase is on the horizon

With its major capital projects nearing completion, Phillips 66 is about to reach a pivot point where it should start generating more cash flow. That's because capital spending is coming down while its growth projects are starting to supply incremental cash flow. Because of that, the company said that investors could expect another dividend increase in 2017. Historically, the company has raised its payout each May, which is likely to be the case again this year. Furthermore, because of all the growth projects entering service, this year's increase could be more than the 12% average increase of the past two years. 

4. MLP drop downs could be a catalyst

One of the vehicles Phillips 66's uses to drive growth is drop-down transactions with Phillips 66 Partners. The companies had completed several transactions over the past few years, with the largest coming last October, when $1.3 billion of assets moved over to the MLP. That said, Phillips 66 still has several assets to drop down to its MLP so that Phillip 66 Partners can reach its ambitious target of generating $1.1 billion of annual EBITDA (earnings before interest, taxes, depreciation, and amortization) by next year. These future transactions should continue to unlock value for Phillips 66, especially if the company then uses the cash to buy back stock.

A gas processing plant.

Image source: Getty Images.

5. A regulation revamp could make refining great again

One of the reasons refining earnings were under pressure last year was due to an increase in environmental compliance costs as a result of the skyrocketing price of Renewable Identification Numbers (RINs). Last quarter, for example, these and other expenses cost Phillips 66 $1.36 per barrel more than in the third quarter. However, the Trump administration is working to shift this obligation, which would cut compliance costs for refiners. If the Trump administration can successfully ease the burdensome regulations hurting refiners, it could lift a weight that has been holding down refining stocks. 

Investor takeaway

Phillips 66's stock hasn't done all that much over the past year due to a tough refining market. However, that underperformance means its stock is selling at a decent price. Even better, Phillips 66 has several catalysts on the horizon that could jump-start its stagnant stock, including new projects entering service, a likely dividend increase, additional drop downs with its MLP, and the possible rollback of regulations. Add it up, and there are five good reasons why now is a good time to buy this refining stock.