US STOCKS-Wall St gains on U.S.-China trade optimism; Trump declares emergency

(For a live blog on the U.S. stock market, click or type LIVE/ in a news window)

* U.S.-China trade talks to continue next week

* Trump declares U.S.-Mexico border emergency

* Nvidia, Pepsi rise on upbeat revenue forecasts

* Financials bounce as U.S. lenders rise

* Indexes up: Dow 1.36 pct, S&P 0.82 pct, Nasdaq 0.38 pct (Updates to early afternoon)

By Amy Caren Daniel

Feb 15 (Reuters) - Wall Street's main indexes were set on Friday to post their biggest weekly gain in nearly a month, as investors were optimistic about the ongoing trade talks to resolve a bruising tariff dispute between the United States and China.

President Donald Trump said talks with China "are going extremely well," and the U.S. is closer than ever to having a "real" trade deal with Beijing. Discussions between the world's largest economies will continue next week in Washington.

"Today's sentiment is mainly based on trade progress and the fact that we will see Chinese representatives in D.C., it seems like the talks are going to deliver results sooner-than-expected," said Edward Moya, market analyst at futures brokerage Oanda in New York.

Hopes of a trade deal ahead of a March 1 deadline has helped the trade-sensitive industrials gain nearly 17 percent so far this year, making it the best performing S&P sector.

The group rose 1.13 percent boosted by bellwethers Boeing Co and Caterpillar Inc.

The markets shrugged off Trump declaring a national emergency in a bid to fund his promised wall at the U.S.-Mexico border without congressional approval, an action Democrats vowed to challenge as a violation of the U.S. Constitution.

"Right now the implications of the emergency is being overlooked, because of the legal battle," Moya said.

Despite the threat of a national emergency, all 11 major S&P sectors were trading higher with financials up 1.89 percent, leading the gains.

The banking sector rose 2.62 percent boosted by big U.S. lenders. JPMorgan Chase & Co, Bank of America Corp and Wells Fargo & Co rose between 1.7 percent and 3.0 percent after Warren Buffett's Berkshire Hathaway Inc increased its stake in the companies.

At 12:55 p.m. ET the Dow Jones Industrial Average was up 345.97 points, or 1.36 percent, at 25,785.36. The S&P 500 was up 22.52 points, or 0.82 percent, at 2,768.25 and the Nasdaq Composite was up 28.54 points, or 0.38 percent, at 7,455.49.

The S&P has rallied more than 10 percent so far this year, driven by progress on trade, a dovish Federal Reserve and a largely upbeat fourth-quarter earnings reports. The benchmark index is now set to end above its 200-day moving average, a proxy for long-term momentum, for a fourth straight session.

In the last leg of earnings, analysts now see profit growth of 16.2 percent for the quarter, according to IBES data from Refinitiv. However, first-quarter estimates are less favorable, showing a 0.5 percent year-on-year decline.

PepsiCo Inc rose 3.1 percent after the soda maker said increased investments in advertising and products will boost sales growth.

Nvidia Corp rose 2.5 percent and helped push the technology sector 0.42 percent higher, after the chipmaker forecast a demand rebound by the end of the year.

Newell Brands Inc plunged 20.4 percent after it forecast lower-than-expected full-year sales due to a strong dollar.

Advancing issues outnumbered decliners for a 3.55-to-1 ratio on the NYSE and a 3.31-to-1 ratio on the Nasdaq.

The S&P index recorded 40 new 52-week highs and no new low, while the Nasdaq recorded 73 new highs and 15 new lows. (Reporting by Amy Caren Daniel and Shreyashi Sanyal in Bengaluru; Editing by Arun Koyyur and Shounak Dasgupta)