It has been a wild week in China and a volatile time for the yuan after the PBOC stepped in to the market.