The first interaction I had with The Motley Fool was to attend the last of its online classes, titled "When to Sell." Several reasons for when to sell were given and illustrated, including when the SEC opens an official investigation or a C-level executive suddenly resigns. Another reason -- one that applies the investment I'm looking at today -- is that the investing thesis has run its course. So as soon as Fool rules permit, I'll be selling the Messed-Up Expectations portfolio's shares of Western Refining (WNR).

The disappearing spread
When I purchased shares in Western Refining, I had two parts to the thesis. One reason was that the spread between the prices of Brent oil and West Texas Intermediate oil was high, about $20 per barrel. That gave Western Refining an advantage, in that it was buying oil at the cheaper WTI price, refining it into gasoline and other products, and then selling those products into markets where the price of Brent oil was the dominant input cost. In other words, it was getting its oil cheaply and was able to profit on the very wide crack spread -- the price between what it was paying to buy the oil and what it was getting from the refined products.

That spread between Brent and WTI prices, which had hovered around $0 for many years, suddenly rose in the beginning of 2011 and stayed high until fairly recently, almost reaching $30 per barrel at one point. (See the following chart.) I purchased Western Refining a total of five times in the MUE portfolio during this period.

Sources: The U.S. Energy Information Administration for daily spot prices of Brent and WTI crude oils; author calculations for the spread. MUE portfolio purchases are indicated by the red diamonds.

The cause for the widening price spread was the sudden rise in supply of oil at Cushing, Okla., where WTI oil is priced, thanks to the sudden surge in oil production from the Midwest, coupled with a lack of means of getting that oil to the refineries, which are mostly located on the Gulf Coast. Those refineries, therefore, had to buy the more expensive Brent-priced oil, which meant that the price of gasoline was determined by that higher-priced crude oil, not WTI oil.

Today, however, a lot of oil is moving away from Cushing via rail to where it is needed. Further, pipelines have been reversed to carry oil away from Cushing, and more pipelines are in the works. Together, these changes are relieving the oversupply pressure that was holding the price of WTI oil down relative to Brent oil. Economics 101 in action. The result is that the spread between the two crude oil prices is back down to the range it was before that 2011 upswing. Last Friday, for instance, it was just a little over $4 per barrel, while it was merely $3 the Friday before that.

Improving (now declining?) margins
The other part of the thesis involved improving margins at Western Refining. At about the same time the Brent-WTI spread increased, the margins at Western Refining improved to the point where the company became profitable -- and eventually solidly profitable -- after spending quite a bit of time losing money. The following chart shows the margins for the trailing 12-month periods ending with the named quarters over the past several years.

Source: S&P Capital IQ.

My concern, today, is that with the collapse of the Brent-WTI spread, the profitability of the company will suffer. In fact, I believe we're beginning to see that already in the latest two TTM periods, with the lowest gross and operating profit levels over the past 10 TTM periods.

Avoiding a shifting thesis
There's one final point I'd like to bring up. When I first purchased Western Refining, it was primarily an oil refining company, with a bit of retail. Now there is talk that the company could reorganize into a master limited partnership.

While the company could pay out handsome dividends as an MLP, that is not the company I purchased. The thesis was for owing shares in a refiner that had a cost advantage and was seeing improving margins as a result, and this hadn't been fully appreciated by the market. That has now pretty much played out, and it's time to sell.

If I want to own Western Refining in the future, I can review the situation in a few months and see whether the new possibilities are something I want to invest in. By selling now, ownership won't influence that decision by leading me to justify holding on, possibly to the point of giving up the gains.

The MUE port will sell its holding of Western Refining and pocket the double the entire position became for the portfolio.

Come and discuss this decision -- and the philosophy of selling -- on the Messed-Up Expectations discussion board.