By Chris Dieterich 

U.S. stocks rose for a fourth straight day, as strong earnings from banks and industrial firms offset disappointing reports from the technology sector.

The Dow Jones Industrial Average added 21 points, or 0.1%, to 16446 in afternoon trading, while the S&P 500 added six points, or 0.3%, to 1868. The Nasdaq Composite Index rose 21 points, or 0.5%, to 4106.

Each benchmark was on course to end the week firmly higher, bouncing back after a selloff in technology and biotechnology stocks had spilled into the broader market. The Dow finished last week at a two-month low.

Buyers have stepped back into the market this week and stabilized the recently hardest hit sectors, traders said. Indexes tracking biotech and Internet stocks have each climbed more than 3% this week.

"The market had pulled back, but it wasn't frenzied selling," said Dan McMahon, director of equity trading at brokerage firm Raymond James. "People were having a tough time finding value," he said. "Now, they say: 'There is some value here now, and let's step in.'"

Corporate earnings were in focus Thursday. Traders said that, aside from trading in companies that posted earnings, the market was quiet ahead of the holiday-shortened week. The stock market is closed Friday for Good Friday.

The tone was upbeat for investment banks. Morgan Stanley rallied 3.2% after exceeding earnings and revenue forecasts, helped by strength in its trading business. Goldman Sachs gained 0.7% after the investment bank's first-quarter earnings and revenue declined from year-ago levels, but exceeded analyst forecasts.

Industrial stocks were the best performers after General Electric's first-quarter operating earnings fell, but topped analyst estimates amid strength in its industrial business. Shares rose 2.4%.

International Business Machines slumped 3% after the technology giant's first-quarter earnings matched estimates but revenue fell more than expected on continued declines in hardware sales.

Google fell 2.3% after reporting late Wednesday earnings that missed analyst estimates, as the amount advertisers pay per click continued to decline.

UnitedHealth Group tumbled 2.9% after the insurer's first-quarter earnings fell 7.8%, hurt by government cuts to Medicare Advantage programs and new taxes resulting from the Affordable Care Act.

American Express slipped 1.9% after beating earnings estimates but missing on revenue.

DuPont slipped 1.1% after missing earnings and revenue forecasts.

Thursday illustrated how this earnings season has "kind of been split down the middle," said Erik Davidson, deputy chief investment officer at Wells Fargo Private Bank, which oversees about $170 billion. "Earnings have been nothing to write home about, but nothing to be despondent about either."

Mr. Davidson said his firm has been gradually trimming its positions in U.S. stocks and tiptoeing back into bonds and commodities this year, skeptical that the S&P 500 can repeat a blockbuster performance that drove a 30% gain in 2013.

Defensive, dividend-paying stocks including utilities have been the best performers this year, while consumer discretionary shares--last year's best performers--have lagged behind.

"You're seeing this rotation," Mr. Davidson said. "Some are moving to dividend-paying stocks and selling the highfliers of last year."

Other long-term investors say they're having a hard time finding stocks that are attractively priced. Despite the recent volatility, the S&P 500 closed Wednesday 1.5% below its April 2 record high of 1890.90.

Mark Travis, president of Intrepid Capital Funds, which oversees $1.5 billion in Jacksonville Beach, Fla., said his firm is sitting on a pile of cash nearly on par with levels reached in 2008. "Prices have been bid up for very stable, in-demand, cash-generating businesses," Mr. Travis said. "We're having a hard time [finding stocks to buy] on a valuation basis," he said.

On the economic front, initial claims for jobless benefits in the latest week increased by 2,000 to 304,000, versus expectations of a rise to 315,000. The previous week's total was revised up slightly from 300,000, the lowest level seen since 2007, to 302,000.

The Philadelphia Federal Reserve's index of manufacturing activity for April jumped to the highest reading since September, to 16.6, from 9.0 in March.

Investors sold Treasury bonds, sending the yield on the 10-year Treasury note up to 2.718% from 2.637% late Wednesday.

Gold futures eased 0.7% to $1294.30 a troy ounce, while crude-oil futures added 0.4% to $104.20 a barrel. The dollar lost ground against the euro but rose versus the yen.

European markets advanced, with the Stoxx Europe 600 gaining 0.5%.

Japan's Nikkei Stock Average was little changed, pausing after a 3% run-up in the previous session, while China's Shanghai Composite gave up 0.3%.

Write to Chris Dieterich at christopher.dieterich@wsj.com