NEW YORK (AP) -- U.S. stocks rose Monday as big technology companies like Apple continued to rally. Investors bought stocks and sold bonds and gold after Congress agreed to a deal that will keep the government operating for the rest of the fiscal year.
Technology companies have set the pace all year and are up more than twice as much as the rest of the market. Apple and Facebook, which will report their first-quarter results in the next few days, helped lead the way.
Investors were relieved that the threat of a government shutdown appears to have been averted, so they bought riskier stocks and sold government bonds, gold, and high-dividend stocks. The VIX, an index that is seen as a measure of the market's anxiety level, fell to its lowest level since February 2007.
Technology companies and banks have stood out in the first quarter, said David Schiegoleit, the head of investments at U.S. Bank's Private Client Reserve. He said many different types of technology companies are doing well, especially ones that cater to consumers. A key reason is that after years of trouble, economies outside the U.S. are improving.
"Emerging market economies are starting to get better momentum and we're also starting to see some pretty decent activity out of Europe," he said. "All the different major components of the technology sector are posting double-digit (earnings) gains."
The Standard & Poor's 500 index picked up 4.13 points, or 0.2 percent, to 2,388.33. The Dow Jones industrial average lost 27.05 points, or 0.1 percent, to 20,913.46 as Boeing and IBM lagged.
Thanks to the gains for technology companies, the Nasdaq composite rose 44 points, or 0.7 percent, to 6,091.60, and set another record high. The Russell 2000 index of small-company stocks gained 6.93 points, or 0.5 percent, to 1,407.36.
Analysts expect first-quarter earnings for technology companies and banks to rise 19 percent from the same period a year earlier, according to S&P Global Market Intelligence. While most banks have already released their results, there are dozens of technology companies remaining to report.
Apple climbed $2.95, or 2.1 percent, to $146.60 and Facebook added $2.21, or 1.5 percent, to $152.46. Microsoft, which disclosed its earnings last week, rose 95 cents, or 1.4 percent, to $69.41.
Online retailer Amazon.com stood out among consumer-focused companies as it picked up $23.44, or 2.5 percent, to $948.43.
Before dawn on Monday, Congress unveiled a spending bill that would fund most government operations through September. The House is currently scheduled to vote on the bill Wednesday. The bill does not include the border wall President Donald Trump has proposed, and rejects his proposed cuts to popular domestic programs.
With investors reassured, they sold bonds. The yield on the 10-year Treasury note rose to 2.32 percent from 2.29 percent. That sent interest rates higher, which allows banks to charge higher interest rates on loans. Capital One Financial advanced $1.19, or 1.5 percent, at $81.57 and Citizens Financial rose 56 cents, or 1.5 percent, to $37.13.
Investors also sold high-dividend stocks including utilities, phone companies and makers of household goods.
Aerospace companies struggled after aircraft parts distributor Wesco Aircraft Holdings gave a weak second-quarter forecast. The company also said its president and CEO retired, and its stock tumbled $2.20, or 18.1 percent, to $9.95. Boeing fell $2.44, or 1.3 percent, to $182.39 and aircraft and helicopter maker Textron gave up 53 cents, or 1.1 percent, to $46.13.
Industrial companies lagged the rest of the market following a report that output by U.S. factories didn't grow as much as analysts expected. The Institute for Supply Management said new orders and hiring grew more slowly in April.
Tribune Media rose after the Financial Times reported that Twenty-First Century Fox and Blackstone may make a joint takeover bid for the company. Tribune Media has stakes in Food Network, WGN cable network and owns TV stations. Tribune stock gained $2.19, or 6 percent, to $38.75. The companies declined to comment. Sinclair Broadcast Group is also reported to be interested in buying Tribune.
Investment management company AllianceBernstein fell after it replaced Peter Kraus as chairman and CEO and removed most of the directors of its board. Kraus has led the company since 2008. The company named a new non-executive chairman and separate CEO, and removed nine of the 11 members of the board. It named six new directors. The stock gave up 75 cents, or 3.3 percent, to $22.15.
Benchmark U.S. crude fell 49 cents, or 1 percent, to $48.84 a barrel in New York. Brent crude, used to price international oils, declined 53 cents, or 1 percent, to $51.52 a barrel in London.
Wholesale gasoline lost 2 cents to $1.53 a gallon. Heating oil fell 2 cents to $1.49 a gallon. Natural gas dropped 6 cents to $3.22 per 1,000 cubic feet.
The price of gold fell $12.80, or 1 percent, to $1,255.50 an ounce. Silver fell 42 cents, or 2.4 percent, to $16.84 an ounce. Copper rose 5 cents, or 2 percent, to $2.66 a pound.
The dollar rose to 111.83 yen from 111.44 yen. The euro advanced to $1.0906 from $1.0895.
Many markets in Asia and Europe were closed for May Day. Japan's benchmark Nikkei 225 was an exception and it gained 0.6 percent. Stocks in Japan were helped by a weaker yen and strong readings in a manufacturing survey.