Updated with closing prices.

Upgrades in the tech sector helped the Nasdaq on Friday, but the major stock indices recorded losses for the week amid falling oil prices, earnings warnings and an unexpected drop in consumer confidence.

The Dow Jones Industrial Average fell 36.65 points, or 0.5%, to 8146.52, and the S&P 500 shed 3.55 points, or 0.4%, to 879.13. The Nasdaq Composite, however, added 3.48 points, or 0.2%, to 1756.03.

JPMorgan Chase ( JPM) was the worst performer on the Dow, with a 3.8% loss. It was followed by Chevron ( CVX), down 2.7%, after an earnings warning.

Analyst adjustments to tech stocks, including upgrades to Novellus Systems ( NVLS) and Dell ( DELL), and an increased price target for Apple ( AAPL) helped to boost the Nasdaq.

(Click below for my interview with Charles Rotblut, senior market analyst with Zacks Investment Research, on what to expect out of this earnings season, including areas to check out and those to avoid.)

Click to Listen
Market Q&A

But all three major indices were negative for the week, with the Nasdaq faring the worst. The Dow Jones Industrial Average gave up 1.6%, the S&P 500 lost 1.9%, and the Nasdaq shed 2.3% in the five-day session.

Both the Nasdaq and the Dow are at critical support levels, said Anu Sharma, managing director of the market intelligence desk at Nasdaq OMX. "Breaking those levels could cause another 4% to 5% decline in the market, which is why you're not seeing people move back into equities right now - people don't want to risk that right now."

Rather, people are taking advantage of gains made in the spring rally and are now more comfortable sitting on the sidelines again, says Sharma. However, that presents a problem, because if institutions aren't buying stocks, then hedge funds and momentum traders are dominating the market, he says. "And a lot of those traders don't look at fundamentals, the try to trade off of a trend."

Not helping to alleviate economic and earnings jitters, Chevron cautioned late Thursday that it faces "significantly lower" results from its refining and marketing operations in the second quarter and that earnings gains from higher oil prices were "largely offset" by unfavorable currency effects.

Also Infosys ( INFY), India's second largest outsourcing firm, reported an increase in profit and beat top-line expectations, sending shares up 4.2%, but warned that the economic slowdown would result in a steep revenue drop.

More fuel for the bears, the University of Michigan's preliminary consumer sentiment index for July fell unexpected to 64.6 from 70.8, vs. expectations for a minuscule decline.

Meanwhile, the U.S. trade deficit narrowed unexpectedly in May to $26 billion, its lowest reading since 1999, down from $28.8 billion and vs. expectations for an expansion to $30 billion as exports increased and imports scaled back.

However, the Department of Labor said separately that import prices increased 3.2% in June, more than expected, due largely to rising oil prices. Export prices increased 1.1% after rising 0.05% the month prior.

 Market Roundup

Quarterly reports will be more plentiful next week, starting with Charles Schwab ( SHHW) on Monday and Goldman Sachs ( GS), Johnson & Johnson ( JNJ), and Intel ( INTC) on Tuesday.

"The year-over-year numbers are not going to be good, we're expecting the median company on the S&P 500 to report earnings that are down 21% year over year," says Charles Rotblut, senior market analyst for Zacks Investment Research. But Rotblut believes those forecasts could prove to be overly pessimistic.

"We've already had 21 of 26 companies top expectations among the early reporters," he says, "and although it's not a representative sample, it does set for a good tone and certainly if you look at some of the companies reporting next week -- particularly a company like Intel or Google -- we are seeing forecasts being revised upward heading into the earnings reports. So it does suggest that we could see some upside from some of the companies reporting."

In other news, General Motors exited Chapter 11 protection Friday morning after a quicker-than-expected reorganization. The U.S. automaker is exiting bankruptcy with $48 billion in debt, vs. $176 billion when it filed for Chapter 11 protection. It will proceed with four brands, including Chevrolet, Cadillac, Buick and GMC, after shedding Hummer, Saturn, Saab and Pontiac.

Also, embattled insurer American International Group ( AIG) is seeking the government's blessing to pay out more bonuses, including $235 million pending for employees at its controversial financial products unit, The Wall Street Journal reports. Its shares were up 23.8%, or $2.26, at $11.74.

As for commodities, crude oil futures fell 52 cents to settle at $59.89 a barrel, in line to have their biggest weekly decline since January, while gold gave up $3.70 to $912.50 an ounce.

Stocks overseas were modestly lower. In Europe, London's FTSE 100 and the DAX in Frankfurt fell 0.8% and 1.2%, respectively. In Asia, the Nikkei in Japan lost 0.04%, and the Hang Seng in Hong Kong fell 0.5%.

Longer-dated Treasuries were rising in price, falling in yield. The 10-year was adding 30/32 to yield 3.29%, while the 30-year rose 1-26/32, yielding 4.19%.

RealMoney Barometer Poll
1 What would best describe your stance heading into the coming week of trading?
2 Which of these sectors do you think is set to move up in the coming week?
3 Which of these sectors do you think is set to move down in the coming week?

View the results without voting

More from Markets

REPLAY: Jim Cramer on How to Navigate the Stock Market Amid Tariff Worries

REPLAY: Jim Cramer on How to Navigate the Stock Market Amid Tariff Worries

Global Markets Hit Hard; AMC Entertainment Sells Stake in Ad Unit -- ICYMI

Global Markets Hit Hard; AMC Entertainment Sells Stake in Ad Unit -- ICYMI

CVS, Walgreens and Citigroup: Cramer's 'Off the Charts'

CVS, Walgreens and Citigroup: Cramer's 'Off the Charts'

Jim Cramer: 4 Stocks Could Get Throttled By a 'Knock Down Drag Out' With China

Jim Cramer: 4 Stocks Could Get Throttled By a 'Knock Down Drag Out' With China

General Electric Booted From Dow, Replaced by Walgreens

General Electric Booted From Dow, Replaced by Walgreens