* Stocks gain on credit thaw optimism
* Financials lead the way, JPMorgan gains 6 pct
* Consumers cut spending for first time in two years
* Dow up 1.6 pct, S&P up 1.5 pct, Nasdaq up 1.3 pct (Updates to close)
By Leah Schnurr
NEW YORK, Oct 31 (Reuters) - U.S. stocks ended one of their worst months on record, but signs of further thawing in credit markets lifted battered shares on Friday.
Hammered by worries over the extent of the damage the credit crunch has inflicted on the global economy, the Dow Jones industrial average logged its biggest monthly decline in a decade, while the S&P 500 had its worst month since the October 1987 market crash.
Financial shares, led by a gain of almost 10 percent in JPMorgan Chase <JPM.N>, lifted Wall Street as the interest rate that banks charge each other for short-term loans continued to ease.
The decrease in overnight interbank borrowing costs prompted hopes that global efforts to bolster confidence in credit markets are taking hold following the Federal Reserve's interest-rate cut earlier this week and spurred investors to search for bargains.
"It seems like you have some continued mild improvement in the credit markets and that seems to be buoying hopes but people should know, conditions may have improved, but they're improving slowly," said Chip Hanlon, president of Delta Global Advisors Inc, in Huntington Beach, California.
The Dow Jones industrial average <
> gained 144.32 points, or 1.57 percent, to 9,325.01. The Standard & Poor's 500 Index <.SPX> rose 14.66 points, or 1.54 percent, to 968.75. The Nasdaq Composite Index < > climbed 22.43 points, or 1.32 percent, to 1,720.95.Friday's rally resulted in stocks clocking in a higher finish for two sessions in a row -- the first consecutive gains in over a month.
For the week, the Dow gained 11.3 percent, its best one-week percentage gain since October 1974. The S&P 500 rose 10.5 percent, its best weekly percentage gain since at least January 1980. The Nasdaq advanced 10.9 percent, its best weekly percentage gain since April 2001.
October, though, was a different story. The Dow lost 14.06 percent, its worst one-month percentage drop since August 1998, while the S&P 500 lost 16.83 percent, its worst one-month percentage slide since October 1987.
Pension funds bought stocks to rebalance their portfolios, also lending support to the market, traders noted.
JPMorgan said it is making changes to about $110 billion in mortgages and is temporarily halting foreclosures while it alters the loans. For details, see [
] The bank's stock, a Dow component, shot up 9.7 percent, or $3.63, to $41.25 on the New York Stock Exchange.Among other financial shares, Morgan Stanley <MS.N> rose 8.6 percent to $17.47., while the S&P Financial Index <.GSPF> gained 5.5 percent.
But economic data on Friday that showed U.S. consumers are tightening their belts offered more evidence of a deep slowdown, though the market appeared to shrug it off.
U.S. consumers cut their monthly spending for the first time in two years during September, according to a U.S. Commerce Department report. [
].On Nasdaq, video game publisher Electronic Arts Inc <ERTS.O> shed 17.9 percent to $22.78 after it chopped its full-year profit forecast due to slowing demand.
After trading on both the up and down side of Friday's ledger, Chevron Corp <CVX.N> ended up 0.6 percent at $74.60 on the NYSE after it reported quarterly profit that beat expectations. The price of oil, which had slipped earlier and pressured the stock, also rebounded. U.S. crude <CLc1> gained $1.85 to settle at $67.81 a barrel on the New York Mercantile Exchange, but recorded its biggest monthly drop ever. In October, the price of NYMEX crude fell a record 32.62 percent.
Shares of Express Scripts Inc <ESRX.O> jumped 5.3 percent to $60.61 on Nasdaq after the pharmacy benefit manager reported quarterly profit that beat expectations after Thursday's closing bell.
In other economic news, an index of consumer sentiment suffered its steepest monthly drop on record, according to the Reuters/University of Michigan Surveys of Consumers' final reading for October.
And the Chicago Purchasing Management Index showed that business activity in the Midwest came to a halt in October as production and new orders plummeted.
Trading was moderate on the New York Stock Exchange, with about 1.57 billion shares changing hands, below last year's estimated daily average of roughly 1.90 billion, while on Nasdaq, about 2.50 billion shares traded, above last year's daily average of 2.17 billion.
Advancing stocks outnumbered declining ones on both the NYSE and the Nasdaq by a ratio of nearly 3 to 1. (Editing by Jan Paschal)