Recent market volatility in emerging and developed economies is showing once again how badly ratings agencies and investors can err in assessing countries’ economic and financial vulnerabilities. Ratings agencies wait too long to spot risks and downgrade countries, while investors behave like herds, often ignoring the buildup of risk for too long, before shifting gears abruptly and causing exaggerated market swings.

Given the nature of market turmoil, an early warning system for financial tsunamis may be difficult to create; but the world needs one today more than ever. Few people foresaw the sub-prime crisis of 2008, the risk of default in the eurozone, or the current turbulence in financial markets worldwide. Fingers have been pointed at politicians, banks, and supranational institutions. But ratings agencies and analysts who misjudged the repayment ability of debtors – including governments – have got off too lightly.

In principle, credit ratings are based on statistical models of past defaults; in practice, however, with few national defaults having actually occurred, sovereign ratings are often a subjective affair. Analysts at ratings agencies follow developments in the country for which they are responsible and, when necessary, travel there to review the situation.

This process means that ratings are often backward-looking, downgrades occur too late, and countries are typically re-rated based on when analysts visit, rather than when fundamentals change. Moreover, ratings agencies lack the tools to track consistently vital factors such as changes in social inclusion, the country’s ability to innovate, and private sector balance-sheet risk.

And yet sovereign ratings matter tremendously. For many investors, credit ratings dictate where and how much they can invest. Ratings affect how much banks are willing to lend, and how much developing countries – and their citizens – must pay to borrow. They inform corporations’ decisions regarding whom to do business with, and on what terms.

Given the problems with ratings agencies, investors and regulators recognise the need for a different approach. Investors have tried to identify good alternatives – and have largely failed. Assessments of risk such as sovereign interest-rate spreads and credit default swaps react (and often over-react) fast but, because they reflect only the market’s understanding of risk, they are not a systematic mechanism for uncovering hidden risks and avoiding crises. The recent sudden rise in market volatility suggests that they are as bad as rating agencies at detecting the early warning signs of trouble.

Regulators are now starting to require banks to develop their own internal ratings processes. The problem is that few institutions have the tools and expertise to do this alone.

A comprehensive assessment of a country’s macro investment risk requires looking systematically at the stocks and flows of the national account to capture all dangers, including risk in the financial system and the real economy, as well as wider risk issues. As we have seen in recent crises, private risk taking and debt are socialised when a crisis occurs. So, even when public deficits and debt are low before a crisis, they can rise sharply after one erupts. Governments that looked fiscally sound suddenly appear insolvent.

Using 200 quantitative variables and factors to score 174 countries on a quarterly basis, we have identified a number of countries where investors are missing risks – and opportunities.

China is a perfect example. The country’s home developers, local governments and state-owned enterprises are severely over-indebted. China has the balance-sheet strength to bail them out but the authorities would then face a choice: embrace reform or rely once again on leverage to stimulate the economy. Even if China continues on the latter course, it will fail to achieve its growth targets and will look more fragile over time.

Brazil should have been downgraded below investment grade last year, as the economy struggled with a widening fiscal deficit, a growing economy-wide debt burden and a weak and worsening business environment. The corruption scandal at energy giant Petrobras is finally causing ratings agencies to reassess Brazil but the move comes too late, and their downgrades probably will not be sufficient to reflect the true risk. Other emerging markets also look fragile and at risk of an eventual downgrade.

In the eurozone, shadow ratings already signalled red flags in the late 2000s in Greece and the other countries on the periphery. More recently, Ireland and Spain may deserve to be upgraded, following fiscal consolidation and reforms. Greece, however, remains a mess. Even with substantial reform to improve its growth potential, it will never be able to repay its sovereign debt and needs substantial relief.

An assessment of sovereign risk that is systematic and data-driven could help to spot the risks that changing global headwinds imply. To that extent, it provides exactly what the world needs now: an approach that removes the need to rely on the ad hoc and slow-moving approach of ratings agencies and the noisy and volatile signals coming from markets.

• Nouriel Roubini, professor at NYU’s Stern School of Business and chairman of Roubini Global Economics, was senior economist for international affairs in the White House’s Council of Economic Advisers during the Clinton administration