After four days of modest losses, U.S. stocks are climbing Thursday as Apple and Amazon both jump. Health care companies are also higher and oil prices are bouncing back after they slipped a day earlier. Bed Bath & Beyond is plunging after it the company cut its annual forecasts following a weak second quarter. The dollar is trading higher against other currencies, sending prices for precious metals lower.

KEEPING SCORE: The S&P 500 index rose 8 points, or 0.3 percent, to 2,914 at closing time. Despite its recent losing streak, the benchmark index is up more than 7 percent since the end of June. With one day left in the third quarter, the S&P 500 is on track for its best quarter since the end of 2013.

The Dow Jones Industrial Average gained 55 points, or 0.2 percent, to 26,440. The Nasdaq composite climbed 52 points, or 0.7 percent, to 8,042. The Russell 2000 index of smaller-company stocks rose less than 1 point to 1,692.

APPLE OF WALL STREET’S EYE: Apple rose after JPMorgan Chase analyst Samik Chatterjee said the stock could climb another 20 percent by the end of next year. Chatterjee said the company was successfully building up its services businesses such as music and payments, which could bring in 20 percent of Apple’s annual revenue in the next few years. Chatterjee said the company might make acquisitions in the gaming, automotive or smart speaker businesses.

Apple rose 2.1 percent to $225.14. Elsewhere in the technology sector, rose 1.4 percent to $160.62. Internet companies also rose. Google’s parent company Alphabet rose 1.4 percent to $1,210.52 and Facebook rose 1.6 percent to $169.54.

Amazon, the most valuable company on the U.S. market after Apple, rose 1.9 percent to $2,012.64 after Stifel analyst Scott Devitt forecast more revenue for its retail, advertising and web services units and raised his price target to $2,525 a share. That would value Amazon at about $1.2 trillion.

THE QUOTE: Scott Wren, senior global equity strategist for the Wells Fargo Investment Institute, said investors have been reluctant to get back into the stock market since the 2008-09 recession, and there are signs that’s changing.

“Retail investors have been underinvested for this whole expansion,” he said. “The economy is decent. The market is correctly pricing in a relatively low possibility of an all-out trade war.”

BLOODBATH: Bed Bath & Beyond plunged 22 percent to $14.68 after the home goods and furnishings company reported earnings that fell far short of what analysts were expecting. The company also lowered its profit forecast for the rest of the year and said it expects lower sales. The stock has dropped from $75 to $14 in less than four years and is trading at its lowest price since March 2000.

Several other companies that reported quarterly results also traded lower. Conagra Brands, the parent of Chef Boyardee and Hebrew National, fell 8.8 percent to $32.90 after its profit and sales fell short of Wall Street projections. Cruise line operator Carnival gave up 4.6 percent to $63.93 after it said prices for recent bookings have been lower than they were a year ago.

ENERGY: Benchmark U.S. crude rose 0.8 percent to $72.12 per barrel in New York while Brent crude, used to price international oils, added 0.5 percent to $81.72 per barrel in London.

Wholesale gasoline rose 1.2 percent to $2.08 a gallon. Heating oil gained 1 percent to $2.32 a gallon. Natural gas rose 2.6 percent to $3.06 per 1,000 cubic feet.

BONDS: Bond prices were little changed. The yield on the 10-year Treasury note stayed at 3.06 percent.

METALS: The ICE U.S. Dollar index climbed 0.7 percent, which pushed metals prices lower. Gold slid 1 percent to $1,187.40 an ounce. Silver lost 0.8 percent to $14.29 an ounce. Copper fell 1.6 percent to $2.78 a pound.

CURRENCIES: The dollar rose to 113.42 yen from 112.85 yen. The euro fell to $1.1658 from $1.1762.

OVERSEAS: The FTSE 100 index in Britain rose 0.5 percent, as did France’s CAC 40. Germany’s DAX gained 0.4 percent. But Italy’s FTSE MIB fell 0.6 percent and Italian government bond prices rose as the new government met to discuss its spending plans. Some investors appear concerned Italy will break eurozone budget rules on to satisfy election promises.

Japan’s Nikkei 225 dropped 1 percent and South Korea’s Kospi, which reopened after a national holiday, added 0.7 percent. Hong Kong’s Hang Seng index slipped 0.4 percent.

© The Associated Press. All rights reserved.