NEW YORK (AP) -- Stocks in the U.S. staged a late afternoon rally to close moderately higher on Thursday, ending a five-day losing streak.
The Dow Jones industrial average rose 92.93 points, or 0.5 percent, to 17,733.10. It had been down more than 100 points earlier in the day. The Standard & Poor's 500 index rose 6.49 points, or 0.3 percent, to 2,077.99 and the Nasdaq composite rose 9.98 points, or 0.2 percent, to 4,844.91.
Investors continued to focus on next week's vote on whether Britain would remain a member of the European Union. Overseas, Japanese stocks plunged 3 percent after the Bank of Japan decided not to increase its economic stimulus efforts.
Traders are bracing for a tight race in the British vote on June 23 on whether to leave the EU. The Bank of England, which kept its rates on hold as well on Thursday, said a vote to leave would likely result in the pound dropping sharply. It would also hurt spending and investment.
"This is going to be a big event. Up until a few weeks ago, the markets were pricing in a probability of the U.K. leaving the EU at around 20 percent. Now the chance is roughly 42 percent," said Richard Turnill, BlackRock's global chief investment strategist. "We are going to see significant volatility ahead of the U.K. referendum."
As a result, investors have been shifting money into assets considered less risky in times of volatility. High-dividend utility stocks rose nearly 1 percent. Gold also rose nearly 1 percent and U.S. government bond yields remain at lows not seen in four years.
"Everyone is focused on the vote. It's all about de-risk right now, taking chips off the table," said Rob Bernstone, a managing director and head of trading at Credit Suisse.
Entertainment conglomerate Viacom jumped sharply in the last hour of trading, closing up $2.85, or 6.8 percent, to $45.05, after Sumner Redstone's National Amusements said it had replaced five of Viacom's 11 directors, including CEO Philippe Dauman. The move came as the mental competency of Redstone, Viacom's controlling shareholder, is being challenged in court.
Meanwhile, drugmaker giant Merck rose $1.41, or 2.5 percent, to $57.50 after the company said it had positive results in a medical study for its cancer drug Keytruda, which could result in higher sales of the drug.
Japan's central bank once again voted not to further ease monetary policy to help the country's faltering recovery. The Bank of Japan is pumping about 80 trillion yen ($769 billion) into the country's economy each year with purchases of Japanese government bonds and other assets.
The yen jumped nearly 2 percent against the U.S. dollar, reaching its highest level in two years. Japanese officials have said they may intervene in currency markets if the yen appreciates too much. Japan's economy is heavily reliant on exports, which are hurt when the yen rises sharply in value against other currencies.
As a result of the Bank of Japan's actions, the U.S. dollar fell sharply against the yen, trading at 104.31 yen compared with 105.98 the previous day. The euro fell to $1.1236 from $1.1268.
The price of benchmark U.S. crude oil sank $1.80 to $46.21 a barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, shed $1.78 to $47.19 a barrel in London.
Energy stocks fell along with the price of oil. Transocean, Marathon Oil, and Murphy Oil, all drilling or oil exploration companies, fell 3 to 4 percent each.
In other energy trading, heating oil fell 5 cents to $1.42 a gallon, wholesale gasoline fell 4 cents to $1.47 a gallon and natural gas fell 2 cents to $2.58 per 1,000 cubic feet.
Gold rose $10.10 to $1,298.40 an ounce, silver rose 10 cents to $17.61 an ounce and copper fell 4 cents to $2.05 a pound.