Updated with Treasuries, stock and commodity prices.

Late-day buying in pharmaceuticals and consumer goods helped lift two the of three major indices into positive territory late Wednesday ahead of Alcoa's ( AA) earnings report.

The Dow Jones Industrial Average climbed 14.8 points, or 0.2%, to 8178.41, while the S&P 500 was lower by 1.47 points, or 0.2%, at 879.56. The Nasdaq Composite climbed 1 point, or 0.06%, to 1747.17.

Johnson & Johnson ( JNJ), Procter & Gamble ( PG), Merck ( MRK), Wal-Mart ( WMT) and Home Depot ( HD) rose more than 1% each on the Dow.

Stocks spent most of the day in negative territory but pared some losses early in the afternoon after the U.S. Treasury sold $19 billion worth of 10-year debt in an auction that attracted unusually strong interest. However, it wasn't until some late-day buying that the major indices found positive territory minutes before the close.

"I think everyone is sitting tight and waiting for earnings; it's the next tangible evidence to see the direction of things," says Jack Ablin, chief investment officer at Harris Bank. "Once we start to see earnings reports come out in earnest, the market will pick a direction," says Ablin. "While it's certainly a downward trend now, it's on very light volume."

Midweek brought some of the first earnings: Ruby Tuesday ( RT) easily beat Wall Street expectations despite a 7% decline in total revenue. But shares fell 5.1% to $7.02.

Family Dollar ( FDO) also topped expectations, and raised its outlook for the year. Its shares rose 12.4% to $31.18.

Alcoa was set to kick off earnings season for Dow Jones Industrial Average stocks with its report after the market close on Wednesday.

The season will get into full swing next week when JPMorgan Chase ( JPM), Intel ( INTC), Bank of America ( BAC), Citigroup ( C) and Nokia ( NOK) report quarterly results.

Among the day's movers, Amgen ( AMGN) gained 13.9% after data showed its experimental bone drug denosumab was better than a competing drug at preventing fractures and bone-related problems in patients with breast cancer. (Click below for my Amgen interview with Senior Columnist Adam Feuerstein)

chart
Click to Listen
Market Q&A

 Market Roundup

In corporate news, Google ( GOOG) executives blogged that the search-engine giant aims to compete head-to-head with Microsoft with its own operating system, Google Chrome OS , an extension of its Chrome Web browser, available by 2010.

Google shares rose 1.5% to $402.49, while Microsoft ticked up 0.1% to $22.56.

Also,telecommunications-equipment maker Ericsson ( ERIC) signed agreements valued at a total of $1.7 billion to provide China Mobile ( CHL) and China Unicom ( CHU) with 2G/3G mobile communication equipment and services.

Ericsson added 0.8%, while China Mobile fell 0.8% and China Unicom gained 4.4%.

Crude oil futures extended losses, falling another $2.89 to settle at $60.14 a barrel. Helping to pressure prices, the U.S. Energy Information Administration reported Tuesday that crude oil inventories fell less than expected last week, while gasoline and distillate stockpiles increased more than expected.

The dollar was weaker vs. the yen but gaining strength against the pound and euro.

Longer-dated Treasuries were rising in price, falling in yield after the government sold $19 billion worth of 10-year debt. The auction had unexpectedly strong demand, marked by a bid-to-cover ratio -- the number of bids received over those accepted -- of 3.28.

The 10-year was gaining 1-11/32 to yield 3.29%, while the 30-year was rising 2-8/32, yielding 4.17%.

Stocks overseas were mostly lower. In Europe, London's FTSE 100 and the DAX in Frankfurt edged down 1.1%and 0.6%, respectively. In Asia, the Nikkei in Japan and the Hang Seng in Hong Kong closed lower by 2.4% and 0.8%, respectively.

More from Markets

Stocks Tumble as Trump Comments Lead to Worries Over China Trade Talks

Stocks Tumble as Trump Comments Lead to Worries Over China Trade Talks

Tiffany & Co. Sees a Strong Market in Asia

Tiffany & Co. Sees a Strong Market in Asia

Imagining the Stock Market in 10 Years

Imagining the Stock Market in 10 Years

Video: Jim Cramer on the Markets, Tiffany, Micron Technology and Union Pacific

Video: Jim Cramer on the Markets, Tiffany, Micron Technology and Union Pacific

Red Robin Slumps After Earnings Miss

Red Robin Slumps After Earnings Miss