UBS predicts the stock market could stage a year-end rally as the so-called earnings recession ends.