Image copyright Getty Images Image caption A bad quarter: Falling Japanese stocks earlier this month

Global stock markets signed off on their worst three months in four years on Wednesday.

Markets saw falls of between 7% and 15% over the three months with the Shanghai index falling furthest, down 25%.

Confidence in stocks has been hit by the crisis in Greece, the Chinese slowdown and the threat of higher interest rates.

However, most markets ended the month with a final flourish, some making gains for the single day of over 2%.

On Wednesday, the Dow Jones, the main American index, ended up about 1.5%. The London FTSE 100 bounced up 2.58%

But the numbers for the major markets from July to September make for sobering reading.

Dow - 7.9%

FTSE 100 - 7.04%

Dax - 11.74%

Nikkei - 14.47%

Shanghai Composite - 24.69%

International Monetary Fund chief Christine Lagarde said: "On the economic front, there is... reason to be concerned. The prospect of rising interest rates in the United States and China's slowdown are contributing to uncertainty and higher market volatility,"

Greek crisis

The markets started the quarter in the throes of the Greek crisis. Many investors were convinced there would be no bailout, economic chaos in Europe, and a Greek exit from the eurozone.

That did not happen, but the European economic recovery has been anaemic at best.

And a mere week after the Greek agreement, China had a Black Friday with the Shanghai market falling over 6%, sending markets round the world into a tailspin.

Markets are often derided as wildly inaccurate economic barometers, but economists were agreed this indicated two very obvious facts: the Chinese stock markets were vastly over-valued, and the Chinese economy was slowing.

They were supported by a growing stream of weak economic figures coming out of China.

That then had a knock on effect on global commodity prices, trade and shipping, and battered the shares in the big mining and energy companies and their support services.

That hit the economies of commodity exporters like Australia, Brazil, Chile, and South Africa, weakening their currencies.

Devaluation

At the end of August China devalued its currency, the yuan, which caused another panic, as investors speculated the country was about to embark on a series of rapid devaluations to undercut its competitors.

With the benefit of hindsight the devaluation seems to have been what the Chinese government always claimed it was, part of a slew of reforms to allow market forces to dictate the value of its currency.

Ms Lagarde in her speech on Wednesday said: "China ... is in the midst of a fundamental and welcome transformation. It has launched deep structural reforms to lift incomes and living standards. These reforms will, by design, lead to a "new normal" of slower, safer, and more sustainable growth. "

But in the meantime the reforms are causing huge volatility in the world's markets.

On top of all this the US - and the UK too - are considering putting up interest rates.

US economy

While the Chinese slowdown has worried American investors, they have fears of their own that US shares are simply overvalued.

Next week sees the start of the third quarter reporting season for America's big companies, which is likely to dictate the mood of the market through to the year end.

Meanwhile, the numbers on the US economy have been ambiguous.

Figures for August showed a sharp 3.2% fall in exports as the weakening global economy and the strong dollar made U.S. goods more expensive for foreign buyers.

The August employment figures were disappointing, but not disastrous.

US economic growth was revised upwards showing an annualised growth rate of 3.9%. But the numbers were for the second quarter - before the summer turmoil.

But some economists believe the economy is strong enough to withstand a rate rise.

Peter Morici, business professor at the University of Maryland, said: "Overall, a Fed interest rate increase won't harm growth and jobs creation, and the Fed is likely to begin gradually raising rates at its October or December policymaking meetings."