US STOCKS-Wall Street builds on record-setting rally; FedEx drops

* Indexes set for sixth straight session of gains

* S&P 500 hits fifth consecutive all-time high

* FedEx tumbles 10% after cutting profit forecast

* Indexes rise: Dow 0.11%, S&P 0.11%, Nasdaq 0.25% (Updates to late afternoon, changes byline, adds NEW YORK to dateline)

NEW YORK, Dec 18 (Reuters) - The S&P 500 inched to an all-time high on Wednesday, extending a record-setting run on investors’ optimism about global economic growth, though a steep drop in FedEx Corp shares limited gains.

The Nasdaq also hit a record high. All three major indexes were on pace for their sixth straight session of gains, building on a rally from late last week spurred by progress toward an initial U.S.-China trade deal.

Analysts said the trade agreement, announced on Friday, removed a major risk for global equity markets, leaving stocks with slightly more room to rise through year-end.

“The trade truce with China has really set the backdrop for a continued move higher to the end of the year,” said Chris Zaccarelli, chief investment officer at Independent Advisor Alliance in Charlotte, North Carolina. “I don’t see a huge rally, just a slow drip.”

The benchmark S&P 500 hit its fifth consecutive record high on Wednesday, its longest streak since January 2018.

A 9.9% drop in FedEx shares capped the index’s gains, though. The U.S. parcel delivery company cut its fiscal 2020 profit forecast on heavy expenses, slowing global trade and the fallout from its breakup with Inc.

The profit warning from FedEx pressured shares of rival United Parcel Service Inc, which fell 1.8%. The decline in FedEx and UPS shares sent the Dow Jones Transport Average down 0.9%.

By contrast, the market largely shrugged off the likely impeachment of U.S. President Donald Trump as the House of Representatives gears up for a historic vote later in the day on two charges accusing Trump of abusing his power and obstructing Congress.

Impeachment would have little effect on the factors most influential on U.S. markets, said Shannon Saccocia, chief investment officer at Boston Private.

“It doesn’t change what the Fed does,” she said. “It doesn’t change what happens from a China perspective.”

The Dow Jones Industrial Average rose 30.17 points, or 0.11%, to 28,297.33, the S&P 500 gained 3.36 points, or 0.11%, to 3,195.88 and the Nasdaq Composite added 22.44 points, or 0.25%, to 8,845.79.

The small-cap Russell 2000 rose 0.3%, hitting its highest level in 14 months.

Facebook Inc shares rose 2.2%, providing the biggest boost to the S&P 500, as Deutsche Bank raised its price target on the stock.

Advancing issues outnumbered declining ones on the NYSE by a 1.57-to-1 ratio; on Nasdaq, a 1.18-to-1 ratio favored advancers.

The S&P 500 posted 40 new 52-week highs and no new lows; the Nasdaq Composite recorded 149 new highs and 47 new lows.

Reporting by April Joyner; Additional reporting by Uday Sampath, C Nivedita and Abhishek Manikandan in Bengaluru; Editing by Saumyadeb Chakrabarty, Shinjini Ganguli and Alex Richardson