What happened

Monday is turning out to be a great day to own shares of companies based in Brazil. Over the weekend, the South American nation held the first round of its 2022 presidential election, and former President Luiz Inacio Lula da Silva was ahead in the polling -- and investors are cheering.

As of 10:45 a.m. ET Monday, shares of Brazilian oil giant Petroleo Brasileiro (PBR -1.38%) (PBR.A -1.18%) (aka Petrobras) were up 12.4%, while electric and gas utility Companhia Energetica de Minas Gerais (CIG 1.56%) had gained 14.6%, and water utility Companhia de Saneamento Basico do Estado de Sao Paulo (SBS -1.16%) (aka "Sabesp") was leading the whole Brazilian stock market higher with a 22.5% gain.

So what

Vying against the incumbent, conservative Jair Bolsonaro, and nine other candidates with minor support, the Worker's Party's da Silva won a plurality of the votes cast Sunday -- 48.4%. That wasn't enough to win the election in the first round, but appears to give him the advantage over Bolsonaro, who won only 43.2% of Sunday's vote.

So why are investors happy with this result?

That's actually pretty hard to explain given that Bolsonaro has advocated privatizing state-owned stakes in companies such as Petrobras while da Silva is believed to be more a fan of nationalization -- or at least of the state using its power to influence policy at companies in which it holds a stake.  

However, while acknowledging the risks, some see upside with Petrobras stock trading for less than four times forward earnings. With Companhia Energetica trading at only about eight times earnings, and Sabesp at barely 10, there would appear to be some opportunities in those stocks as well.  

Now what

Potentially the best gains here, at least in the short term, could come if Bolsonaro pulls out an upset victory. As an article in The Wall Street Journal stated Monday morning, Bolsonaro's 43% of the vote was actually surprisingly strong given that polls had him entering the election's first round expecting no more than 36% or 37% support. And further down the ticket, the Journal article pointed out that Bolsonaro allies running for congress or state governorships "swept to victory" Sunday.  

That means there's at least a chance of an upset in the election's second round on Oct. 30, and this prospect may be what investors were betting on Monday morning as they bid up shares of companies that seem more likely to suffer under a da Silva administration than under a Bolsonaro one.  

The downside, of course, is that if da Silva manages to maintain and build on his first-round lead, and ultimately emerge victorious at the end of this month, gains could quickly evaporate. But even that result could turn around if a da Silva administration turns out to be less bad for business than feared.

Ultimately, investors are best advised to focus less on the polls, and more on the profits. So long as these three companies remain profitable, and keep mailing out their dividend checks, they'll reward investors no matter who occupies the Palacio da Alvorada.