In a stark shift, the country's stock market is on the verge of dropping out of the world's five biggest for the first time in three years