It was not supposed to go like this. After a genuinely positive 2025 South Africa entered the new year with improved fiscal metrics, a stronger credit standing and financial markets that had rewarded the country’s growing credibility. Then came the US and Israeli strikes on Iran, the closure of the Strait of Hormuz, and a sharp spike in global oil prices that left investors reassessing the outlook for commodity-dependent emerging markets. Yet here is the surprising thing: South Africa was holding up better than almost anyone anticipated, even before the “peace deal” between America and Iran announced at the weekend by US President Donald Trump.Rating agency Moody’s decision at the end of May to revise the country’s credit outlook from stable to positive, in the middle of this external shock, says something important about where South Africa actually stands. To understand why Moody’s acted, followed swiftly by Fitch on June 5, it helps to recall where we have come from. South Africa fell into sub-investment grade in 2020, when Moody’s became the last major rating agency to make that downgrade. What followed was a slow, disciplined process of fiscal repair: conservative budgets, meaningful spending constraint and a commitment to reducing the debt-to-GDP trajectory. That work has now been recognised by all three major agencies. Earlier this year S&P upgraded South Africa to double-B flat and retained a positive outlook. Fitch’s move, from BB- to BB, brings all three into alignment at that level, though it remains the most cautious of the three. The numbers back it up. South Africa has now posted a primary surplus for three consecutive years, which means that, excluding interest costs, government is spending less than it collects in revenue. The main budget deficit came in at 4.3% last year, better than the 4.6% the National Treasury had projected. In addition, in April, the first month of the new fiscal year, tax revenues came in R5.9bn higher than forecast. These are not trivial outcomes. They reflect a level of fiscal discipline that has, in our view, been underappreciated by markets. The monetary picture is similarly constructive, though the Strait of Hormuz closure has complicated the path. The Reserve Bank entered this period of uncertainty in a position of relative strength: the repo rate was at 6.75%, a meaningful positive real interest rate, and inflation expectations had been well anchored. The Bureau for Economic Research’s first-quarter Inflation Expectations Survey showed the two-year-out forecast at just 3.6%, a clear affirmation of the Reserve Bank’s credibility. That credibility gave the bank room to skip a rate hike at the March monetary policy committee (MPC) meeting despite the fog of uncertainty around oil prices. That room has since narrowed. The initial hope that the Strait might reopen quickly faded, and the disruption extended for longer than markets priced in. Oil infrastructure damage and depleted inventories mean elevated energy prices are likely to persist for some time even if the peace deal holds.The Reserve Bank hiked interest rates by 25 basis points at the most recent MPC meeting and may do so again, specifically to prevent second-round inflationary effects from feeding through into the broader basket. Food inflation adds another layer of risk. Fertiliser shortages and diesel-driven supply chain costs are already beginning to show up in food prices, and the possible formation of an El Niño weather system raises the spectre of drought conditions next year. These are real concerns, and the bank has them firmly in its sights. What has surprised many observers is the resilience of the rand, even before the past weekend. South Africa’s export commodity basket has done a great deal of heavy lifting here. Coal prices are well above historical averages. Gold has benefited from central bank diversification away from dollar exposure, a trend that may have more medium-term durability than cyclical commodity moves typically do. Platinum and palladium have also seen notable gains. The net result is that South Africa’s terms of trade have acted as a meaningful buffer, keeping the currency far more stable than the scale of the energy disruption might have suggested. The central question is how long this holds. Crude oil has dropped to $75-$80 a barrel on expectations of increased supply if the Strait stays open, but if it doesn’t and prices spike above $100 per barrel again, when does it become a serious structural problem? The honest answer is that economies are more dynamic than simple models suggest. What has prevented oil from spiking to the $150-$200 range that many analysts would have predicted for a prolonged Strait closure is a combination of aggressive inventory drawdowns and significant demand destruction, particularly from China, which now imports about 5-million barrels per day less than it once did. For South Africa a similar dynamic would likely play out through the growth outlook, rather than through a fiscal or currency crisis. First quarter GDP figures told a mixed story: private fixed investment fell sharply, household consumption barely moved, and the headline was flattered by a collapse in imports that reflects softening domestic demand as much as anything else.Yet growth still came in at +0.5% quarter on quarter, which was ahead of both sell-side consensus and the bank’s own forecast, and a reminder that even a fragile growth story can surprise to the upside. The more important question is whether fiscal policy will stay committed to the debt trajectory, even under pressure. In our view the answer is yes, and the rating agencies appear to agree. The outlook upgrades, granted in the middle of a major external shock, is perhaps the clearest external validation of that conviction. South Africa is not immune to what is happening in global energy markets. But it is better placed than it has been in years to absorb the pressure. • Naidu is portfolio manager at Ninety One.