China's market regulator finalizes rules that have been three months in the making.