Updated from 1:51 p.m. ET with market close information, an updated forward P/E ratio for JPM, and more on the federal debt limit debate in Washington.

NEW YORK ( TheStreet) -- The nation's largest banks led a broad stock market rally Thursday afternoon, as Republicans in Congress appeared ready to come to an agreement with President Obama to raise the federal debt limit.

The broad market staged a major rally, with the broad indices all ending with gains of more than 2%. The KBW Bank Index ( I:BKX) was up 3% to 63.30, with all 24 index components ending with gains of at least 2%.

Big banks showing gains of over 3% included Capital One ( COF), with shares closing at $70.59, and State Street ( STT) of Boston, which closed at $66.94.

Over the past week, investors have been fixated on the partial shutdown of the federal government that began on Oct. 1, because of the inability of the Republican-led House of Representatives and the Democrat-led Senate to agree on a continuing resolution to keep the entire government running. More importantly, investors have worried about the possibility of the United States defaulting on debt payments, if the legal federal debt limit is not raised above the current $16.7 trillion.

U.S. Treasury secretary Jack Lew has previously warned the government could run out of money after Oct. 17. During testimony before the Senate Banking Committee on Thursday, Lew said the government has "large payments to Medicare providers, Social Security beneficiaries, and veterans, as well as salaries for active-duty members of the military," adding that a failure to raise the debt ceiling by Oct. 17 "could put timely payment of all of these at risk."

Rep. Paul Ryan (R., Wash.) on Wednesday proposed a short-term increase of the debt limit, in order to allow time for a major agreement with Democrats to be negotiated, which "drew broad support from conservatives at the Capitol Hill meeting," according to a Wall Street Journal report. The Associated Press reported that House Speaker John Boehner (R., Ohio) also supported a short-term debt-limit increase.

House Republican leaders were also expected to meet with Obama late Thursday afternoon.

The positive developments raising hope of a timely solution to the debt-ceiling fiasco followed a positive reaction Wednesday to the president's nomination of Janet Yellen to chair the Federal Reserve after current Fed Chairman Ben Bernanke steps down in January.

Yellen is a former CEO of the Federal Reserve Bank of San Francisco and has served as vice chair of the Federal Reserve Board since 2010.

KBW Washington analyst Brian Gardner in a note on Wednesday wrote that despite some opposition from Republicans in the Senate to Yellen's nomination, "we expect her to be easily confirmed."

Gardner also addressed the potential opposition of Yellen based on her support of the Federal Reserve's extraordinary monetary stimulus efforts. "We should also add that prominent inflation hawks like John Taylor have praised Dr. Yellen's qualifications and the ability to handle the job while disagreeing with her on policy. In our view, this makes it tough for a critical mass of Republicans to block the Yellen nomination."

Time to Focus on Bank Earnings

Earnings season for major U.S. banks will kick off early Friday, when Wells Fargo ( WFC) announces its third-quarter results, with JPMorgan Chase ( JPM) also reporting before the market open.

Plenty of coverage heading into third-quarter earnings season has centered on the major decline in mortgage loan production, as rising long-term interest rates have curtailed the refinancing wave. Atlantic Equities analyst Richard Staite in his preview for eight large-cap banks on Sept. 23 estimated the group's third-quarter mortgage production revenue would plunge 45% from the second quarter and 55% from the third quarter of 2012.

Staite also estimated that trading group for the eight large-cap banks he covers -- including Wells Fargo, JPMorgan, Bank of America ( BAC), Citigroup ( C), Morgan Stanley ( MS), U.S. Bancorp ( USB) and PNC Financial Services Group ( PNC) -- would decline 20% in the third quarter from a year earlier.

But despite those painful revenue declines, Staite estimated a total revenue decline of just 5% year-over-year for the group, reflecting a continuing decline in expenses and "relatively stable net interest income."

For Wells Fargo, the consensus third-quarter net income estimate among analysts polled by Thomson Reuters is $5.229 billion, or 97 cents share, compared to 98 cents the previous quarter and 88 cents a year earlier. The consensus third-quarter revenue estimate is $20.973 billion, declining from $21.378 billion in the second quarter and $21.213 billion in the third quarter of 2012.

Analysts on average expect JPMorgan Chase to report third-quarter net income of $4.781 billion, or $1.19 per share. In comparison, the bank earned $1.60 a share during the second quarter and $1.40 a share during the third quarter of 2012. JPMorgan's revenue is expected to decline to $24.942 billion during the third quarter from $25.958 billion the previous quarter and $25.863 billion a year earlier. JPMorgan CFO Marianne Lake at a conference on Sept. 9 said a "crescendo" of regulatory actions against the firm would lead to provisions for legal expenses "which will more than offset" an expected "$1.5 billion or so of consumer loan loss reserve releases."

Lake also said that JPMorgan was expecting its residential mortgage loan production unit to show net losses for the second half of 2013.

The major overhang on JPMorgan is an expected large settlement of multiple criminal and civil investigations of the company's mortgage lending, sales and servicing activities, which could climb as high as $11 billion, according to media reports.

Despite the regulatory onslaught against JPMorgan, which during the third quarter included an agreement to pay $410 million "in penalties and disgorgement to ratepayers," to settle Federal Energy Trading Commission charges of market manipulation, $920 million in fine s to settle multiple probes of the 2012 "London Whale" trading fiasco and another $369 in fines and customer refunds to settle regulatory charges of "illegal credit card practices," the bank remains analysts' favorite large-cap bank stock.

Out of 39 analysts covering JPM, 26 rate the shares a "buy," in part reflecting the stock's low valuation to forward earnings estimates. The shares rose 3% Thursday to close at $52.26 and traded for just 8.7 times the consensus 2014 EPS estimate of $6.00.

Philip W. van Doorn is a member of TheStreet's banking and finance team, commenting on industry and regulatory trends. He previously served as the senior analyst for TheStreet.com Ratings, responsible for assigning financial strength ratings to banks and savings and loan institutions. Mr. van Doorn previously served as a loan operations officer at Riverside National Bank in Fort Pierce, Fla., and as a credit analyst at the Federal Home Loan Bank of New York, where he monitored banks in New York, New Jersey and Puerto Rico. Mr. van Doorn has additional experience in the mutual fund and computer software industries. He holds a bachelor of science in business administration from Long Island University.