Refiners are suffering from a gasoline glut that has been squeezing margins for months, and it is does not look like it is going to get better any time soon -- despite traders and some analysts looking more bullish on the group as of late.

With stalling oil prices, peak driving season nearly over and the gas glut still in control, refiners have to be hoping for something -- maybe even something as forceful as a hurricane (hello, Tropical Depression Nine) -- to reduce enough of the inventory to lift margins.

In all seriousness, just look at how the S&P 500 Oil and Gas Refining and Marketing Sub Index has underperformed the general S&P 500, especially since February.

S&P 500 Oil and Gas Refining and Marketing Sub Index

View Chart »  View in New Window »

Considering that RBN Energy, a fundamentals analytics company known for its energy markets consultancy, sees no end in sight for the East Coast gasoline glut, tighter margins will likely persist until the oversupply is no longer a factor. Current U.S. crude oil inventories are at historically high levels for this time of year at 523.6 million barrels, according to the U.S. Energy Information Administration, meaning the bloated inventories will keep weighing on margins -- as they have been doing for months.

RBN Energy's Abdui Zein noted that gasoline inventories started 2016 already high, with about 60 million barrels in Petroleum Administration for Defense District 1, which includes the whole East Coast. (Zein also said that the U.S. East Coast is the main connection to the world gasoline market.)

And even though inventories were already above average, "East Coast refineries kept producing at generally the same pace as in 2015 through May 2016," Zein wrote. Furthermore, according to the RBN Energy note, the inventory build-up was exacerbated by imports.

"In the last 17 weeks (ending in early August), weekly imports have been higher year-on-year 15 out of 17 times," according to RBN. The import increase, Zein said, originated primarily in Western Europe and India, because those countries' storage supply is limited.

Now, these bloated gasoline inventories have "contributed to falling gasoline margins despite gasoline consumption having been 2.3% higher through the first seven months of 2016 compared with the same period last year," according to the EIA. The agency also forecast that the gap between the price per gallon of crude oil and gasoline will fall below $1 per gallon in November 2016 and then bottom out at 84 cents per gallon in January 2017 -- that's the lowest the gap has been in more than five years, Zein noted.

And the high-demand season for gasoline is ending with Labor Day. While refinery maintenance should clear up some of the surplus, to get back to the median stock level of the last two years, Zein said that demand would need to rise by 220 million barrels per day -- "the equivalent of 40% of the refining capacity on the East Coast."

For the gasoline market to find balance, particularly for the East Coast, refining margins are the key. And in order for that to happen, refiners, both on the East Coast and abroad, need to adjust production levels to achieve normal inventory stockpiles, something that Phillips 66 (PSX - Get Report) President Tim Taylor has already recognized.

"Somewhere between the U.S. East Coast and some of the European refineries ... there needs to be some balancing on the inventory side or the production side to balance that out," Taylor said during a July 29 conference call with analysts.

Refiner Valero Energy (VLO - Get Report) is planning for some rebalancing and lower refinery utilization moving forward. "I do believe that you will see some refinery cuts as we head into the third and fourth quarter," CFO Gary Simmons said during the latest quarterly conference call.

But Tesoro's (TSO) management mentioned unexpected maintenance in the second quarter, with no major maintenance planned for the third quarter.

Meanwhile, Marathon Petroleum's (MPC - Get Report) CEO Gary Heminger has faith in the industry. "The key point is, and I believe that the refining industry has shown pretty good resolve in the past, that there is no need to be running inventories up that are going to cause the degradation in margins into the future," Heminger said.

Real Money contributor Daniel Dicker is convinced that things "can't get much worse" for refiners. The president of wealth management firm MercBloc and former floor trader at the New York Mercantile Exchange wrote in the middle of August that refiners have underperformed the rest of energy for many reasons, including the increase in crude stockpiles and a quicker conversion to winter blends (which yield even lower margin than summer blending). But now he sees a value play on refining stocks.

"There's been doom-and-gloom for the refiners' sector," said Dicker in a recent phone interview Thursday. But he sees a turnaround coming. "Not tomorrow, not next week, but over the course of the fall, I think there is value there," Dicker said. "Hard to imagine that [margins] can get much worse in an environment when the crude oil glut is lessening."

Jefferies initiated coverage of several U.S. independent refiners on Aug. 22, giving Marathon Petroleum, Tesoro and Valero all buy ratings, while Phillips 66 stock was rated a hold.

"Following a sharp increase in margins due to wide basis differentials and declining crude prices, refining margins have come under recent pressure as downstream products remain oversupplied," wrote Jefferies analysts in a research note. "As a result, we see the potential for planned maintenance downtime and economic run cuts in order to help address the stockpile overhang."

Jim Collins, founding partner of the Portfolio Guru and also a Real Money contributor, is bullish on the outlook for gasoline for a couple of reasons.

First, Collins believes that demand has been very strong. "I think, just like crude, people tend to focus only on the supply side when it comes to refined products, but lower prices are absolutely stimulating demand, and that should help put a floor under retail gas prices as we exit the driving season," Collins said via email.

Second, refinery utilization has been "really underwhelming" for the past six months, Collins added citing data from Oil and Gas 360.

However, while some traders and analysts are seeing a value play in refiners, more discipline is needed to manage inventory stockpiles. Only then will the margins ease.

-- Aidan Dougherty contributed to this story. 

Editor's Note: This article was originally published on Real Money at 1:50 p.m. on Aug. 30.

Employees of TheStreet are restricted from trading individual securities.

Jefferies Disclosure: Jefferies does and seeks to do business with companies covered in its research reports. As a result, investors should be aware that Jefferies may have a conflict of interest that could affect the objectivity of this report. Investors should consider this report as only a single factor in making their investment decision.