On Oct. 1, China will celebrate its 70-year transformation into an economic superpower — just in time for widespread fears that a trade war with the United States will derail that growth and drag the world economy down with it. From a markets perspective, a lot is at stake. A July report from the McKinsey Global Institute found that depending on China's engagement with the world in the coming years, economic value of between $22 trillion to $37 trillion could be added or subtracted from the global economy by 2040. Here are four charts that show how China rose to become today's global economic powerhouse.

China's climb up the ranks

China overtook Japan as the world's second-largest economy in 2010, measured in current prices or nominal terms (not accounting for inflation), according to data from the World Bank and the Organisation for Economic Co-operation and Development. It has since remained in that position, second only to the United States.

Some economists have predicted that China's economy will surpass America's by about 2030. But when taking into account the different standards of living across countries — also known as adjusting to purchasing power parity — the Chinese economy has been the world's largest since 2014, according to the World Bank.

Chinese leadership

Under the leadership of Deng Xiaoping, one of the most prominent and powerful leaders of the country in the 1970s, China kicked off a series of reforms in 1978 that brought the country out of economic isolation. Growth accelerated in the years after that, averaging at around 10% before slowing down to an average of 7.1% under current president, Xi Jinping. However, a study released in March by the Brookings Institute estimated that China may have overstated its GDP growth from 2008 to 2016 by 1.7 percentage points.

Factory of the world

One major driver behind China's economic rise was its massive network of factories that churned out everything from toys to mobile phones for consumers all over the world. China's entry into the World Trade Organization in 2001 helped it cement its status as the world's factory and largest trader. In the McKinsey report which analyzed 186 countries, China was found to be the largest export destination for 33 nations and the largest source of imports for 65.

Investment boom