Last week was a week of gains that came on the heels of four consecutive weeks of losses. The rally was broad, with all indices up by about the same amount in percentage terms. The Dow climbed higher for five straight sessions. Now, the market is back up around year-to-date highs. For the week ending July 17:

Dow: Up 7.3% to 8,743.94

Nasdaq: Up 7.4% to 1,886.61

S&P 500: Up 7% to 940.38

Second-quarter earnings season kicked into high gear last week, as we got a read on the tech sector, the banking sector, and many more.

Earnings fever
General Electric (NYSE:GE), considered a barometer for the economy, given its breadth and depth of businesses, continued to struggle. Its capital unit and its core industrial unit were the cause of GE's hardship, as the financial crisis and recession pressured operations and new orders.

Bank results were clearly divided. Goldman Sachs and JP Morgan Chase (NYSE:JPM) fared better than Bank of America (NYSE:BAC) and Citigroup (NYSE:C), which are still being weighed down by their large exposure to the consumer sector. Those with strong exposure to consumer businesses continue to be harder hit. Most expect credit losses to continue and are upping loan loss reserves. Although the financial landscape appears to have stabilized, things are still tough.

Capital market beneficiaries
Goldman is already profiting from the rubble, as it gained market share in the wake of the elimination of competitors due to the financial crisis. The bank, which crushed earnings expectations, had a strong quarter on account of shrewd trading bets, but warned about the sustainability of results in current economic conditions.

JP Morgan reported a 36% increase in second-quarter profits from last year, helped by its capital markets businesses. The bank said certain businesses were beginning to stabilize, and that it’s toying with the idea of reinstating its dividend next year and buying back stock. However, the bank said it expects deterioration in credit to continue.

Consumer exposed
B of A posted better-than-expected earnings, but results were lower compared to the second quarter last year. Credit losses and non-performing assets increased in the quarter. CEO Ken Lewis acknowledged a tough operating climate through next year, dotted by poor credit, rising unemployment, and a weak global economy.

Citigroup posted a surprise profit on its sale of brokerage unit Smith Barney, but credit losses continue to weigh on the bank. Citi still faces loan losses and has set aside more money than last year to deal with them.

Tech beat
Technology companies appear to be suffering in the wake of weak product demand and delayed purchases, which are expected to continue. Intel (NASDAQ:INTC) gave the most upbeat report of the tech sector thus far. Sales and profit margins were stronger than in the first quarter, as PC sales began to rebound for the company. Intel also lifted its revenue outlook for the current quarter, indicating that the worst is over for the largest supplier of computer chips.

IBM (NYSE:IBM) posted a 12% increase in second-quarter earnings on cost cutting. However, revenue still fell 13%. The company acknowledged that the economic environment remains tough and signaled that businesses aren’t going to start spending anytime soon. Despite this, IBM raised its full-year earnings outlook.

On the flip side, Dell struck the most cautionary note of the technology companies, stating global tech spending was weak and that it would run the business assuming continued weak demand. Remember, Dell has been fighting an uphill battle since 2006 -- before the recession began -- when it started losing share to Hewlett-Packard.

What’s ahead
This week brings round two for second-quarter earnings as heavy hitters from Apple to DuPont to Microsoft (NASDAQ:MSFT) to McDonald’s report.

Let’s see if corporate earnings this week have what it takes to keep this rally going. Look for revenue growth, though we’ll probably have to settle for more cost cutting and strong management.

For related Foolishness: