The flattening of the yield curve is exuding a bad omen for the stock market if history is any guide.