Risks remain, however. The S&P upgrade will most likely mean an even higher value for the real, which could crimp profits at some of the exporters listed above, although global growth will continue to support better names.
Two other trends could derail Brazilian shares: an end to the commodity boom and, oddly, a return to health for the U.S. economy. The two are intertwined.
"This is a significant complication," Dennis says. "Commodity prices will come down sharply when the U.S. economy starts to recover." If that seems counterintuitive, the answer is to be found in the dollar. A U.S. recovery, and the stronger greenback that would accompany it, could spell the end of the speculative fervor in commodity markets. Basically, if the greenback reverses its downtrend, Brazilian shares could weaken.
Also, analysis of past S&P upgrades shows that shares often fall following an investment-grade bump. Other nations like Mexico and Russia saw declines in the months following their upgrades. Still, Brazil's boost came earlier than expected, and that could help minimize some of the post-party hangover.
Uncertainty aside, the events of the past week mark a heady achievement for Brazil. It will be worth watching for some time to come.