Stocks held modest gains most of the day, but slipped slightly in the final hour of trading Wednesday as gains in technology stocks like Apple were offset by declines in consumer staples makers including Coca-Cola.

Energy companies fell along with the price of crude oil. Investors are also working through the Federal Reserve’s latest policy statement. The Fed didn’t make any changes to interest rates but left the door open for increases later this year.

advertisement | advertise on newsday

ON WALL STREET: The Dow Jones industrial average ended down 1.6 points, about 0.01 percent, at 18,472.2. The Standard & Poor’s 500 index lost 2.6 points, about 0.1 percent, to 2,166.6. The Nasdaq composite gained 29.8 points, about 0.6 percent, to 5,139.8.

OIL PRICES: The price of U.S. benchmark crude fell $1.04 to $41.88 a barrel on the New York Mercantile Exchange. In London, the price of Brent crude, use to price international oils, was down $1.47 at $43.40 a barrel.

FED WATCH: The Federal Reserve voted to keep interest rates unchanged while noting that “near-term risks” to the economy have “diminished.”

The Fed said that the U.S. job market has rebounded, with strong job gains in June following weak growth in May. But it says in a statement after its latest policy meeting that it still plans to monitor global economic threats and financial developments to ensure they don’t slow the economy.

Investors will get another policy decision by one of the world’s central banks on Friday, when the Bank of Japan is likely to vote to increase its economic stimulus efforts.