Refining giant Valero (NYSE:VLO) doesn't know the word small. From the monumental price range of shares on a five-year chart, to the scale of its refining operations, Valero does everything big.

The second quarter provides a perfect example, as the company recorded a massive swing from an operating profit of $1.2 billion in 2008 to a breathtaking $317 million loss. Despite the none-too-subtle warning of a $0.50-per-share loss that accompanied news of a dilutive share offering last month, the actual loss of $0.48 managed to negatively surprise analysts despite beating the revised guidance. Building investors' headaches even bigger, the company warned of further losses in the third quarter to boot.

Reeling from debilitating margin weakness, Valero has moved in a big way to curtail production. The company has closed the Aruba refinery through at least September, at which time it will review profitability metrics again, and this week added a coker at the Corpus Christie campus to the hit list. All told, Valero aims to rein in production to a mere 78% of capacity, confirming my earlier call that previous cuts would prove insufficient. Competitor Tesoro (NYSE:TSO) recently announced its own shutdown of a California hydrocracker unit for "unscheduled maintenance."

Key among the factors contributing to Valero's malaise is the loss of the competitive cost advantage that refiners capable of utilizing sour crude feedstocks typically enjoy. This development presents a bad omen for fellow sour crude processors like Holly (NYSE:HOC) and even resurgent small cap Calumet Specialty Products Partners (NASDAQ:CLMT). The sour advantage is insufficient to account for all this margin weakness, though, leading this Fool to expect hard times across the competition, from Western Refining (NYSE:WNR) to the refining unit of ConocoPhillips (NYSE:COP).

Valero's big message for you
Loath to break its own big mold, Valero spoke out in a very big way against Washington's design of the "cap and trade" initiative as envisioned by the Waxman-Markey bill passed by the House of Representatives last month. Valero Chairman and CEO Bill Klesse called cap and trade "a hidden tax" that will "significantly raise the consumer price of gasoline and other fuels." He added that "more than a million high-paying jobs will disappear from our already weakened economy, with no measurable improvement in global climate change."

Impacts of the legislation would obviously vary by company, and despite a recent foray into ethanol production, it seems Valero is not expecting to be a beneficiary the way coal miner Peabody Energy (NYSE:BTU) might. So maybe Valero's concern isn't wholly altruistic.

Further Foolishness:

Start investing today – just $7 per trade with Scottrade. Or find the broker that's right for you.

More than 4,300 CAPS members, including 1,274 All-Stars, expect four-star Valero to outperform the S&P 500. Will you follow these Fools, or blaze your own trail? Join the free CAPS community today and share your thoughts about Valero.

Fool contributor Christopher Barker reminds Fools to perform DDDD: due diligence on demand destruction. He can be found blogging actively and acting Foolishly within the CAPS community under the username TMFSinchiruna. He tweets. He owns no shares in the companies mentioned. The Motley Fool has a highly refined disclosure policy.