The S&P 500 gained slightly to hit a record high on Wednesday as minutes from the Federal Reserve’s last meeting showed the central bank’s commitment to accommodative policy in order to support a full economic recovery.