Is Chicago Bridge and Iron living happily ever after with Shaw? Source: Ksunka-11 via Wikimedia Commons.

When Chicago Bridge and Iron (NYSE:CBI) announced that it would acquire the Shaw Group back in 2012, it did so with the fanfare that usually accompanies a merger: The marriage would be transformational; it would save on costs, create loads of synergy, and do all the things it was designed to do. The market agreed, and quickly doubled CBI's stock price to a peak of $89 in early 2014.

But despite all the talk of synergies, Shaw and CBI were worlds apart, as different as they come in the EPC (engineering, procurement, and construction) sector. CBI is one of the leading companies in that field. Shaw by contrast was a hodgepodge mix of substandard companies clobbered together by an ambitious management; to top it off, it was saddled by a portfolio of money-losing nuclear contracts.

Not surprisingly, the market soon realized the wrongness of this marriage and halved the stock price back to where it stood before the vows were exchanged. Since Shaw is now half of CBI, to understand if CBI is a good investment today, we must dig deeper into Shaw. 

Who exactly is this Shaw, and how bad is she?
Shaw began life in 1987 as a small but ambitious pipe fabricator. It only entered the EPC field in 2000 when it acquired the assets and unfortunately also the liabilities of the then-bankrupt Stone & Webster, once a leading name in the EPC sector.

With this acquisition, Shaw entered the big time. Its revenues grew to $1.5 billion in 2001, then broke $3 billion the following year. But beneath the spectacular growth, Shaw was struggling to adjust to the EPC business, and the contracts it inherited from Stone were no help at all.

The EPC business is unique in many ways, and to understand Shaw and CBI, we need at least a basic understanding of this rather obscure sector.

Contracts in this sector range from, on the one hand, the fixed-price contract, in which cost savings and cost overruns go to the contractor, to the cost-reimbursable contract, in which the contractor simply passes along the costs to the contractee and earns a pre-established margin. A lot of contracts are neither one nor the other, but somewhere in between; fixed-priced contracts can have a cost-reimbursable component and vice versa.

To survive in this field, one must be technologically competent, but above all, one must know how to manage risk. An EPC company is half fabricator/manufacturer, half insurance company. When it signs a fixed-price contract, for instance, the contractor is, in effect, selling the contractee insurance. In return for a higher contract price -- a sort of premium -- it accepts the risk of cost overruns, which can be quite staggering, as we will see.

Surviving in this sector is no easy task, and Shaw from the beginning was ill-equipped for the challenge. To cover its weaknesses, Shaw relied on its accounting skills, that is to say, on its ability to mask reality. Since CBI later would resort to similar measures, it behooves us to dig a little deeper into this unfortunate episode.

The shenanigans of Shaw
An acquisition gives the unscrupulous buyer a prime opportunity to obscure reality. One way to do this is to book a large liability, a reserve, under a name like "accrued contract losses" or "fair value reserve," and then gradually release that reserve over time as management sees fit.

Typically when a reserve is booked, it's done through the income statement -- the loss reserves of an insurance company, for instance, are created by an expense, usually the biggest expense, on its income statement. When a company is acquired, however, the liability is simply consolidated without ever being expensed, and then it's released over time as management sees fit.

Not only did Shaw book a reserve, it made good use of the one-year "measurement period" that is allowed under U.S. GAAP. In 2000, it started with a reserve of $119 million, of which it released $13.5 million that same year, bringing the reserve down to $106 million. In 2001 -- the sharpest cut of all -- it released $99 million in reserves and then simultaneously replenished them by $43 million. Because it was still within the measurement period, Shaw could add the $43 million to its reserves not by expensing through the income statement, but by adding to goodwill as a reevaluation of previous estimates.

But accounting magic could not hide the fact that Shaw had overextended itself. It was a mere pipe manufacturer, after all, which had acquired itself into the EPC business. It had no real experience running a major project, nor in managing risk on a grand scale.

In 2003, telltale signs of trouble appeared. Shaw released $42 million in reserves that year as a reduction to cost of revenues. Since it reported about $32.6 million of income before taxes, in reality it had lost about $9 million at best -- and not earned $20 million as it reported. Operating cash flow came in at a staggering minus $200 million. Not surprisingly, the stock fell from a high of $63 in 2001 to a low of $8.9 in 2003.

These conditions made it impossible for Shaw to pay off the debt it had incurred for its acquisitions. As the principal came due, it had no choice but to issue stock. Between 2004 and 2005, its share count went from 43 million to 84 million. When the dust settled, about 47% of the company had been sold for about $500 million, a staggering level of dilution by any measure.

Shaw's Vietnam
But if Shaw was a clumsy operator, it was an excellent visionary, always ready with a new vision to replace the old one that had just failed. When it acquired Stone & Webster back in 2000, it was the mighty possibility of the U.S. power market that justified the move. When this went sour (remember Enron?), it was the environmental and infrastructure sector that was supposed to be so promising. In 2007, it was the nuclear sector's turn to be graced by Shaw's presence.

Nuclear, despite its promise, is a tough business, not so much because of competition, but because of the general difficulty of the projects, their long completion times, and the political/regulatory risks.

Into this field, Shaw jumped, and in 2008, it finally got its wish. It signed contracts to build nuclear reactors, two each, in Georgia and South Carolina. It was the first such project since Three Mile Island and a big deal for a company which had only entered the EPC field in 2000.

Then came the troubles. Permit delays and operational setbacks led to cost overruns. The nuclear projects became Shaw's Vietnam, and I am convinced that had the gallant CBI not come to the rescue with a $3.3 billion offer (very rich by any measure), Shaw would not have survived this quagmire. Now Shaw's problems have become CBI's problems, and much of CBI's recent travails are due to the mounting losses from Shaw's ambitious projects.

Is CBI cheap?
In 2013, after acquiring Shaw, CBI reported its highest net income ever in its long, century-old life: $454 million. (It has since been surpassed by the 2014 earnings figure.) It also reported its lowest operating cash flow ever -- a negative $112 million.

Why this difference between income and cash flow? A couple reasons: First, there are the reserves. It is difficult to say exactly how much CBI booked because the figure is embedded in an account called "billings over costs and earnings" -- similar to deferred revenue. The release of these reserves would certainly account for at least part of the disparity between operating cash flow and net income.

The other reason is quite simply because the cost overruns related to the Shaw projects are not being recognized as losses. According to CBI, those are not really losses because contractually, they are entitled to be reimbursed for them, both by the owner and, if not by the owner, then by their partner, Westinghouse Electric. In the meantime, costs are being incurred and cash is flowing out, while non-cash earnings are being booked as assets.

This kind of accounting is far from conservative -- the cookie jar reserves especially are inexcusable -- but when it comes to the recognition of losses, one must remember that CBI is in the middle of legal disputes with both the contractees and Westinghouse; and it is difficult to lay a claim to money that is being simultaneously written off in one's own reports. Doing this may be conservative accounting but it would weaken CBI's argument and boost the morale of its legal foes.

Investor Takeaway
CBI is a troubled company. But is it a bad investment? If you rely purely on the price-to-earnings ratio, it is certainly cheap. And let's not forget that even bad businesses can be good investments. If you had bought Shaw at its trough in 2003, you would have doubled your money by 2006. Being a bad business, though, it would have been a one-time "cigar-butt" type of investment. Compared to Shaw, CBI is a much better business. In the risky area of fixed-priced contracts, CBI was once a star. But is it a star still? By acquiring Shaw, did it marry more than it can handle?

What is the worst that can happen? That is the key question we must answer if we are to justify an investment in CBI. If in the worst case scenario, CBI avoids bankruptcy, even if it has to issue shares, an investment makes a lot of sense because CBI has considerable "optionality." If you believe that cheap natural gas will lead to more natural gas liquefaction, then CBI is the bet for you. If you think CBI's culture can win over Shaw's culture, then you have a winner here. But in order to devote a good chunk of your portfolio to this company, you must first answer that key question -- "how bad is bad?" If you can't answer this question, you shouldn't buy the stock, maybe an option, but not the stock.

In a later article, I'll try to figure out, first, how much CBI has lost so far, and second, how much it stands to lose in the future. Success in this endeavor, however, is far from guaranteed.

Benjamin Ra has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. 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.