This year’s robust stock market performance defied analysts’ predictions as investors cheered prospects of lower interest rates and inflation.