After starting out the year with a pretty awful first couple of weeks, shares of midstream and refining giant Phillips 66 (NYSE:PSX) are set to end 2015 significantly outperforming the stock market, and absolutely crushing the rest of the oil and gas industry:

PSX Total Return Price Chart

PSX Total Return Price data by YCharts

As the chart shows, Phillips 66 has made for a great investment over the past year, while the rest of the industry, as represented by Energy Select Sector SPDR (ETF) (NYSEMKT:XLE) and Vanguard Energy ETF (NYSEMKT:VDE), two relatively broad funds that track major energy sector indices, has been killed. 

So what's made Phillips 66 a superior investment this year? Is the company set to have an even better 2016? Let's take a closer look. 

What sets Phillips 66 apart 
Phillips 66 isn't completely immune to commodity prices. Its exposure is much less, but it's also significantly different from that of oil and gas producers, and the companies which supply producers with equipment and services. 

Phillips 66 is really a consumer of oil and natural gas, not a producer. The company buys crude oil to make refined products like gasoline, jet fuel, motor oil, and many others, which it then sells, and buys natural gas to manufacture ethane, polyethylene, and other kinds of plastics and chemicals, which are then used by manufacturers to make many of the products you use, from water bottles to kids toys to car tires to fertilizers. 

In other words, falling oil and gas prices can be beneficial for Phillips 66, since it means lower manufacturing costs. Of course, falling oil prices means falling prices for the things made from oil, but Phillips 66 has another big advantage that can mitigate that impact. 

Efficient refining is a cash cow
Phillips 66 has some of the most advanced refining operations in the world, which can process a variety of kinds of crude oil, often selling for a lower cost than Brent crude. Brent is a global crude-oil benchmark that factors heavily in refined product prices In other words, flexibility in the crude the refineries can process can help the company get additional price advantages. Furthermore, those advanced refineries are often more efficient, meaning lower production costs per unit of oil. 

Put these advantages together, and while the company's refining segment may see revenues fall with oil prices, its profitability has done more than just hold up. Through the first nine months of 2015, refining operations have generated $2.1 billion in profits, versus $1.3 billion in 2014. 

That's right -- since the beginning of 2014, the company's refining business has increased profits by 62%, while oil prices have fallen by more than half:

Brent Crude Oil Spot Price Chart

Brent Crude Oil Spot Price data by YCharts

Petrochemicals and midstream are the growth engine 
Refining is a cash cow, but the expense of building new refining capacity, and very slow pace of demand growth make it an unattractive business to invest in for growth. However, midstream capacity and petrochemicals are both in high demand, and that demand is set to continue growing for years to come. 

CPChem, the company's joint venture with Chevron, benefits from cheap, plentiful domestic natural gas to produce the products mentioned earlier in this article. The joint venture is set to grow significantly in the coming years, and largely because of the plentiful supply of low-cost domestic natural gas it has access to make it much cheaper to manufacture in the U.S., versus using more expensive oil and naphtha in places such as the Middle East. 

The midstream segment, which is primarily pipeline and gathering operations, does have commodity exposure. Phillips 66's joint venture with Spectra Energy, DCP Midstream, and master limited partnership DCP Midstream Partners, LP, operates substantial natural gas and natural gas liquids gathering and pipeline operations.

Over the past year, DCP Midstream and its MLP have suffered tremendously under the impact of commodity prices, as many of its contracts for NGLs were tied to spot prices realized for those products. And while this has slashed Phillips 66's midstream profits by half over the past year, the company isn't letting a spate of bad timing and bad contracts keep it from investing in the growth prospects for natural gas. Instead, DCP Midstream is taking steps to rework its contracts and reduce its commodity exposure, and Phillips 66 is investing heavily in expanding its midstream business. 

To wit, Phillips 66 recently announced the start-up of Sweeny Fractionator One, which will be able to process 100,000 barrels of NGLs per day, and that its Freeport LPG export is on track -- and on budget -- to open in the second half of 2016. The company recently announced it would spend $3.2 billion on midstream segment capital projects next year, including the $200 million that MLP Phillips 66 Partners would spend. 

2016 and beyond: excellent business with long-term strength
Since spinning off from ConocoPhillips in 2012, Phillips 66 management has done a remarkable job keeping costs contained, investing in the best growth opportunities, and then returning the extra cash left over to shareholders.  

Will 2016 be its best year yet? I think there's a good chance that it will, but that's really not what matters most. Looking at the bigger picture and beyond 2016, Phillips 66 is one of the few energy companies to benefit from America's oil and gas boom, without having its prospects solely tied to oil or gas prices. 

Jason Hall owns shares of Phillips 66. The Motley Fool owns shares of and recommends Spectra Energy. The Motley Fool recommends Chevron and DCP Midstream Partners. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.