What happened

Shares of Phillips 66 (PSX -3.64%) rallied 15.7% in June, according to data provided by S&P Global Market Intelligence. Several catalysts fueled shares of the downstream oil and gas company, including improving refining market conditions and notable progress on several growth-related initiatives.

So what

Refining stocks got pummeled in May due to concerns that the already challenging market conditions in the sector would worsen. That view, however, changed in June, with analysts from Goldman Sachs proclaiming that the worst was over for the top U.S. refiners. The investment bank sees several catalysts on the horizon, including new emissions rules that go into effect next year and an increased flow of low-cost oil supplies when new pipelines come online later this year. On top of that, a massive fire devastated the biggest refinery on the east coast last month, which will cause it to shut down permanently. That move will have a positive effect on the refining market.

An oil refinery at twilight with oil storage tanks in front.

Image source: Getty Images.

Phillips 66 also made excellent progress in expanding its nonrefining businesses last month. The company took steps to grow its midstream operations by sanctioning two new oil pipeline projects. The refiner and a partner will move forward with the Liberty Pipeline, which will improve the flow of oil out of the Rockies. On top of that, Phillips 66 teamed up with another company to build the Red Oak pipeline. That project will help improve the flow of oil out of the Permian Basin as well as move crude from a major oil storage terminal in Oklahoma to the Gulf Coast. The company also took steps to build a new offshore oil export terminal in Texas last month.

Meanwhile, Phillips 66 and its partner Chevron (CVX -0.17%) made a move to expand their chemicals joint venture (JV), CPChem. The companies agreed to develop a new petrochemical plant in Qatar. It will be the biggest such facility in the Middle East, turning ethane into ethylene, which is a key building block for plastics. And speaking of plastics, the Chevron-Phillips 66 JV also reportedly bid $15 billion to buy Canadian plastics maker Nova Chemicals last month.

Now what

Shares of Phillips 66 have been under pressure for much of the past year because of the challenging conditions in the refining market. However, those headwinds seem to be abating, which suggests there are better days ahead for the refining giant. On top of that, the company moved forward with several needle-moving projects in both the midstream and chemicals sectors while also taking steps to secure additional growth opportunities in those industries. That future upside, when combined with the fact that shares of Phillips 66 are still down more than 15% over the past year even after last month's rally, is why it remains one of the top oil stocks to buy for 2019.