The worst defeat in Brazil’s soccer history is giving a boost to the country’s stocks.

The iShares MSCI Brazil Capped ETF gained 1.5 percent at 1:19 p.m. in New York, set for the biggest advance in three weeks on speculation yesterday’s World Cup loss dims the prospects for President Dilma Rousseff to win re-election in October.

American depositary receipts of Petroleo Brasileiro SA added 3.3 percent, while state-run Banco do Brasil SA climbed 1.5 percent.

Markets in Sao Paulo are closed for a holiday.

Brazilian assets have rallied this year as polls showed Rousseff losing voter support, bolstering the prospects for a new administration to try to jump-start economic growth.

While UBS AG says the magnitude of yesterday’s 7-1 loss in the soccer-obsessed nation could curb the gains as consumer and investor confidence crumbles, the possibility of a new government that would intervene less in state-owned companies is enough to bolster stocks in the short term, ING Groep NV says.

“People were so convinced this was their World Cup, it’s a huge blow,” Eric Conrads, a money manager who helps oversee $500 million in Latin American stocks at ING, said in a telephone interview. “Given the magnitude of the loss, the way they lost, and the cost of the World Cup, I can only imagine that after the tears, some Brazilians will be angry” with Rousseff’s administration.

Rousseff, who was jeered at the stadium by some disappointed fans, has overseen the slowest economic growth for any Brazilian president in two decades. Yesterday’s loss to Germany dashed Brazil’s hopes of overcoming the national tragedy of losing the final match of the 1950 World Cup at home.

Humiliating Defeat

“It is such a humiliating defeat that you wonder whether it will have a negative impact on Brazilians’ psyche,” Geoffrey Dennis, who’s been covering Brazil since the early 1990s and is now head of emerging-market strategy at UBS, said yesterday. “Brazil has to get over this massive loss.”