The following commentary comes from an independent investor or market observer as part of TheStreet's guest contributor program, which is separate from the company's news coverage.

NEW YORK (

TheStreet

) -- Investors are all too often their own worst enemies, and one common way this manifests itself is through political bias.

In the run-up to the reelection of President George W. Bush in 2004, die-hard Democrats were too willing to ignore or deny the economic expansion that was under way because they were anxious to see the incumbent lose his job. These emotions probably led some investors to miss out on the full benefits of the bull market that was under way then, and the same is true in 2012. Staunch Republicans accuse President Obama of leading the country down the road to ruin even as the S&P 500 has essentially doubled from the lows it made shortly after the Democrat took office -- an epic rally by historical standards.

I avoid discussing politics in this space because my own personal views are irrelevant to the subject at hand. Intelligent investors always strive to position their portfolio for the world as it is, not as they think it should be. Follow your heart in the ballot box, but when it comes to buying and selling securities, use only your head.

With that in mind, let's acknowledge that the presidential election is going to be an overriding focus in the markets this year and take a cold, hard look at the consequences of potential outcomes in November. We'll go ahead and assume that the frontrunner for the Republican nomination -- former Massachusetts governor Mitt Romney -- will prevail in the primaries, and the general election will be a contest between him and Obama. Furthermore, let's take the candidates at their word in terms of what they'll try to do if they win, despite the well-founded skepticism that I and others have about the authenticity of many of the promises that are being made to voters by both sides at this stage of the spectacle.

In terms of which side is likely to win, I'll refrain from forecasting the outcome and just point to the latest odds reported by the online trading exchange, Intrade, which has been a fairly reliable predictor of such things. Currently, Intrade gives Obama a 57.4% chance of being reelected.

Also, let me state for the record that I generally don't think it's a good idea to make investment decisions based on political outcomes. If you're buying or selling a stock because of who you think is going to win an election, you're probably not pursuing a very sound investment strategy. That said, the presidential elections of the world's leading superpower certainly do have consequences, which is why so much money is spent to influence their outcomes, and it's wise for any investor to stay abreast of what those consequences might be.

That brings us to the first publicly-traded corporate beneficiaries of the election. Whichever side wins, major media conglomerates like

News Corp.

(NWS) - Get Report

,

Time Warner

(TWX)

,

Walt Disney

(DIS) - Get Report

and

CBS

(CBS) - Get Report

are certain to enjoy massive windfalls of ad spending. Every four years, the recent record for political contributions to candidates seems to be shattered, and this year, growth in contributions is expected to be less restrained than ever after the Supreme Court's "Citizens United" ruling opened up the floodgates, and the lion's share of this money is poured into TV advertising, which is a godsend to the media industry.

Also, social media companies like

Google

(GOOG) - Get Report

, soon-to-be-public Facebook and Twitter are also likely to be winners as the candidates find new ways to harness the power of their sites to communicate with voters, bolstering these tech companies and their brands as powerful, disruptive forces in the global business landscape.

More specifically, an Obama victory probably favors social media and the broader tech sector as the President and his party have been more sympathetic to the industry's arguments in favor of so-called net neutrality rules, which would restrict the ability of network operators like

Verizon

(VZ) - Get Report

,

AT&T

(T) - Get Report

,

Comcast

(CMCSA) - Get Report

and

Time Warner Cable

(TWC)

to manipulate the traffic that flows over their networks.

On the flip-side, the network operators would be favored by a Romney victory, since Republicans have generally opposed net neutrality regulations. The absence of such rules could provide the telecommunications giants a greater opportunity to manage traffic on their networks to the benefit of their business interests. This would also benefit media and entertainment companies, since it could reduce the threat of Internet piracy and it could also limit the ability of smaller content producers to reach mass audiences online and compete with the conglomerates.

In healthcare, a Romney victory could bolster drug companies, like

Merck

(MRK) - Get Report

and

Pfizer

(PFE) - Get Report

, since Republicans are less friendly to class action lawsuits and regulation of pharmaceuticals in general than their opponents. If he follows through on his pledge to repeal Obama's signature healthcare reform law (assuming the Supreme Court hasn't already done the bulk of his work for him), that could also benefit pharmaceuticals, but it could be a blow to major healthcare insurance companies, like

Aetna

(AET)

and

United Healthcare

(UNH) - Get Report

, which would actually benefit from the law's controversial mandate requiring all citizens to purchase insurance.

An Obama victory would favor major industrial and construction companies, like

Caterpillar

(CAT) - Get Report

and

Deere

(DE) - Get Report

, which could benefit from the increased federal spending on infrastructure and public works encouraged by the President and his allies. Meanwhile, Obama's reelection could bode ill for major defense contractors, like

Raytheon

(RTN) - Get Report

and

Lockheed Martin

(LMT) - Get Report

, which would suffer from the defense cuts Obama has initiated. Romney, for his part, has criticized those cuts and pledged to reverse them.

In the energy sector, a Romney victory would favor the oil and gas sector, dominated by the likes of

Exxon Mobil

(XOM) - Get Report

and

Chevron

(CVX) - Get Report

. The Republican has pledged to allow the controversial Keystone Pipeline projects to move forward, which would transport crude from the Athabasca Oil Sands in Canada to refineries in the U.S., and he and his allies would likely curtail drilling restrictions in the Gulf of Mexico and elsewhere, as well as environmental regulations on controversial drilling practices like hydraulic fracturing.

Obama has argued for ending tax breaks for oil companies and making public investments in emerging, alternative energy technologies that are less damaging to the environment than the consumption of fossil fuels. His approach bodes well for so-called green energy companies, like

First Solar

(FSLR) - Get Report

,

Westport Innovations

(WPRT) - Get Report

and

Clean Energy Fuels

(CLNE) - Get Report

.

The financial sector would prefer a Romney victory as he has argued for a rollback of the Dodd-Frank bank reform law, which was championed by Democrats and is a blow to megabanks like

Bank of America

(BAC) - Get Report

and

JP Morgan

(JPM) - Get Report

. Detroit automakers like

General Motors

(GM) - Get Report

, however, may want to stick with the Democrat who saved their industry -- at least for the time being -- with the federal bailouts in 2009 that were opposed by Romney and most of his Republican allies, who blasted the bailouts as an overreach of government.

I'm guessing I've raised hackles on both sides of the aisle at this point, which hopefully means I've stuck to my stated goal of thinking objectively about all this and keeping my own emotions and biases at bay. If I've made any mistakes or missed any important points, let me know and I'll follow up with any feedback that has real merit in a future piece.

May the best man win.