So much of the news surrounding the summer Olympics has been dominated by pessimism, with worries about everything from dirty water to dirty tricks and even dirty bombs. But when it comes to host country Brazil, financial markets are reflecting the exact opposite sensation: optimism, or maybe even downright euphoria.

If the year ended today, Brazilian equities would be on the gold-medal podium. The Ibovespa, Brazil’s benchmark equity index, has surged 33 percent. And because the real has also been rallying, the returns in dollar terms have been almost double that at 65 percent.

If you had the gumption to bet on Brazil with leveraged exchange-traded funds, you would've more than doubled or tripled your money so far this year.

As the headline on a Bloomberg article aptly put it last week: "No One Told Brazil Markets That Rio Olympics Would Be a Disaster." Much of the rally in stocks and the real can be chalked up as a rebound following underperformance in the previous few years, though a lot of it is also being attributed to optimism surrounding the cabinet that acting President Michel Temer has put together.

Goldman Sachs has called it an economic dream team, which to sports fans will surely conjure up images of the U.S. men's basketball team once the pros started playing in the Olympics.

Let's not spoil the fun by reminiscing about what happened to the hoops dream team in the 2004 Olympics. The real declined on Monday after a magazine reported that Temer was accused of receiving illegal campaign donations. Suffice it to say that with economic growth of only 1 percent forecast for next year after two years of nasty recession, and political and market volatility a perennial risk for Brazil, keeping this rally going may require a truly Olympic feat.