History shows investors should buy shares in makers of construction materials and home products after number beats big.