U.S. Markets close in 4 hrs 54 mins

US STOCKS-Wall St gains on hopes of weekend resolution in Washington

* JPMorgan posts first loss since 2004, a blow to Dimon

* Markets encouraged by bipartisan talks in Washington

* CBOE Volatility index falls to 15-level

* Indexes up: Dow 0.5 pct; S&P 0.4 pct; Nasdaq 0.6 pct

By Angela Moon

NEW YORK, Oct 11 (Reuters) - U.S. stocks extended gains on Friday, a day after their biggest rally in more than nine months as investors were hopeful for a solution to end the partial government shutdown that would stave off a possible U.S. default.

One motivation for Friday's buyers was the chance an agreement could come over the weekend. The Senate is expected to vote over the weekend on extending the federal borrowing limit through January 2015.

President Barack Obama and congressional Republican leaders worked to end their fiscal impasse on Friday, but struggled to strike a deal on the details for a short-term reopening of the federal government and an increase in the U.S. debt limit.

"People don't want to be short going into a weekend, especially if a deal does get done," said Dennis Dick, proprietary trader at Bright Trading LLC in Las Vegas.

The partial shutdown is now in its eleventh day and less than a week remains before an Oct. 17 deadline to extend the government's borrowing authority and avoid a debt default.

All S&P sectors were up except consumer staples, which fell slightly. Energy stocks led the S&P 500, up 1 percent after the Environmental Protection Agency proposed lowering the required amount of ethanol to be blended into U.S. gasoline after Thursday's market close.

The CBOE Volatility index VIX, Wall Street's so-called fear gauge, fell 4.1 percent to 15.80, the lowest in nearly two weeks.

"This rally will provide opportunity to modify positioning, as we expect fundamentals to matter more as the credit cycle turns," said Peter Cecchini, managing director at Cantor Fitzgerald in New York, in a note to clients.

The Dow Jones industrial average was up 75.24 points, or 0.50 percent, at 15,201.31. The Standard & Poor's 500 Index was up 7.18 points, or 0.42 percent, at 1,699.74. The Nasdaq Composite Index was up 23.80 points, or 0.63 percent, at 3,784.55.

JP Morgan Chase & Co, the biggest U.S. bank by assets, reported a rare quarterly loss after incurring $9.2 billion in legal expenses. Its shares seesawed throughout the trading session, and were down 0.2 percent at $52.39 in late afternoon.

Wells Fargo & Co, the biggest U.S. mortgage lender, reported a 13 percent rise in third-quarter profit, but its mortgage banking income fell sharply as the refinancing boom began to fade. Wells Fargo was down 0.4 percent to $41.26.

Apparel chain Gap was down 6.6 percent to $36.86 a day after reporting net sales were flat compared with last year.

The Thomson Reuters/University of Michigan index of consumer sentiment fell in October to its weakest in nine months and was below expectations.