Trade war tension between the US and China has put an end to the local stock market's record run as risk and fear return to investor thinking.