Wall Street held small gains to trade at all-time highs by Tuesday afternoon after Federal Reserve Chair Janet Yellen played the part of both dove and hawk.

The Dow Jones Industrial Average added 0.3% after swinging between slight losses and gains Tuesday morning. The S&P 500 was up 0.25%, and the Nasdaq rose 0.23%.

Yellen reiterated her stance Tuesday that rate hikes would be gradual. Yellen also pointed to a number of uncertainties, including changes in U.S. policy and productivity growth, that could alter the Fed's timeline. 

"Since my appearance before this Committee last June, the economy has continued to make progress toward our dual-mandate objectives of maximum employment and price stability," Yellen told Congress. "At its meeting that concluded early this month, the Committee left the target range for the federal funds rate unchanged but reiterated that it expects the evolution of the economy to warrant further gradual increases in the federal funds rate to achieve and maintain its employment and inflation objectives."

However, Yellen also said Tuesday it would be "unwise" to wait too long to raise interest rates. Yellen said "incoming data" backs up that inflation is trending toward 2% and the job market is retaining its soundness. 

The chances of a rate hike in the coming months sent bond prices tumbling. The yield on the U.S. Treasury two-year note climbed to nearly its highest point since 2009, up 3% to 1.24. Futures indicate markets expect a 43% chance of at least three hikes this year, according to CME Group. The chances of at least three moves in 2017 sat at 33% on Monday. 

In a question-and-answer session with Congress members, Yellen said the Fed aimed to get the balance sheet down, though the process would not begin until the process of monetary normalization progressed further. Yellen also noted that Donald Trump's call for two regulations to be scrapped for every one introduced would not apply to independent agencies. 

The Fed will also be paying close attention to the Republicans' efforts to dismantle the Affordable Care Act, said Yellen. Should Obamacare be pulled, higher health insurance costs could impede consumer spending and hurt economic growth. 

Yellen delivered her semi-annual monetary policy testimony before the Senate Banking Committee. Yellen will address the House of Representatives on Wednesday. 

Market expectations for a rate hike at next month's meeting remain slim, but the outlook for the rest of the year is murkier. The Fed has expressed a more hawkish lean in recent months as inflation trends toward the central bank's 2% target and the U.S. economy nears full employment.  

"We're taking her comments with a pinch of salt, as we know that in recent years the Fed has prepped investors to expect rate hikes that did not materialize," said E*TRADE vice president of investment strategy Mike Loewengar. "But with at least some Fed hikes expected, investors are looking for accelerated growth, and a bump in equity values."

The U.S. economy currently warrants "significantly higher rates," Richmond Fed President Jeffrey Lacker said in comments at the University of Delaware. Lacker, who is not a voting member of the Federal Open Market Committee, said current unemployment and inflation levels call for tighter monetary policy. 

Also on Tuesday, Atlanta Fed President Dennis Lockhart will make a speech and hold a Q&A in Alabama, and Dallas Fed President Robert Kaplan will participate in a panel discussion in Houston.

Producer prices in January logged their largest gain since 2012 as higher gas prices pushed inflation toward the Fed's target. The U.S. producer price index increased 0.6% last month and increased 1.6% over the past 12 months. Core prices, excluding food and energy, rose by 0.2%. 

Stocks have reached new records in recent days afterDonald Trump made vague promises of tax reform. The president said he would deliver a tax reform plan in the near future. The recent rally restarted big gains achieved in the two months after the U.S. election in November. 

"The Trump Trade remains in force, as investors believe the economy and earnings will be improving," said Paul Nolte, portfolio manager at Kingsview Asset Management. "Little in the way of details has been offered, so we remain cautious given the giddy feeling in the stock market. That short-term giddiness can continue, but long-term returns are being suppressed."

The Trump rally hit the skids following his January inauguration as geopolitical uncertainty, particularly in the wake of a controversial and unconstitutional travel ban, made market waves. The travel ban, which affected seven Muslim-majority nations, was deemed unconstitutional last week by judges in the 9th Circuit.

The Trump White House saw more dysfunction on Monday night after Michael Flynn resigned as national security adviser. Flynn had stirred controversy for lying to Vice President Mike Pence over conversations he had had with Russia before Trump's inauguration. Trump's ties with Russia and the country's involvement in the election have plagued the new administration since its win in November. Flynn's resignation should ease immediate concerns, though larger questions over how deep the White House's ties to a foreign agent remain.

Apple (AAPL) traded at a new all-time high on Tuesday after closing at records a day earlier. Shares rose more than 1% to an intraday record of $134.93. The stock was on a tear on Monday after UBS analysts noted that its services business was currently undervalued. The new record on Tuesday snapped the old one set in February 2015.

Apple is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer and the AAP team buys or sells AAPL? Learn more now.

Aetna (AET)  rose 2% and Humana (HUM)  dipped 0.7% after the two disbanded a merger agreement. The merger had been and would likely continue to be subjected to intense regulatory scrutiny from the Department of Justice. Aetna will pay Humana a $1 billion termination fee.

Under Armour (UA) climbed on Tuesday after analysts at Morgan Stanley published a positive note on the beleaguered sports apparel maker, upgrading the stock to "Equal Weight" from "Under Weight". Analyst Jay Sole wrote, "We believe the Under Armour brand has sustained some damage, but overall remains solid. We also believe the company will begin slowly leveraging expenses in FY18."

Shares of French automaker Peugeot (PEUGF) rose in Paris on Tuesday on news that General Motors (GM)  is in advanced talks with its French rival over its European brands Opel and Vauxhall. GM shares rose 5% on Tuesday.

Shares of Credit Suisse (CS)  that trade in the U.S. rose less than 2% despite a wider-than-expected loss in the bank's fourth quarter. The company posted a fourth-quarter loss of Sfr2.35 billion ($2.34 billion) after recording a settlement with the Department of Justice. Analysts anticipated a loss of Sfr2.07 billion. Credit Suisse reached a settlement with the DoJ in December over selling mortgage-backed securities. The agreement included a $2.5 billion penalty and $2.8 billion which is to be paid to consumers over the next five years.

Hologic (HOLX) fell more than 3% on Tuesday after agreeing to acquire Cynosure (CYNO) for $1.65 billion. Cynosure rose 28%. The deal expands Hologic's presence in the medical aesthetics market, one of the fastest-growing markets in the U.S. A day earlier, Allergan (AGN) agreed to purchase body-contouring company Zeltiq Aesthetics (ZLTQ) , one of Cynosure's competitors. 

Mattel (MAT)  inched higher after securing a partnership with Alibaba (BABA) to sell its toys in China. Mattel will sell its products through Alibaba's Tmall.com platform. The toymaker will also work with Alibaba to develop products specifically for the region. 

T-Mobile (TMUS)  beat expectations for earnings and revenue in the fourth quarter. The telecom earned 45 cents a share on sales of $10.19 billion in its fourth quarter. Analysts anticipated earnings of 28 cents a share on $9.86 billion in revenue. The stock fell 0.6%.

Discovery Communications (DISCA) beat sales and earnings estimates in its recent quarter, though a drop in advertising led to some pressure on its stock. The media network earned 52 cents a share, up from 34 cents a share in its year-ago quarter. Adjusted earnings came in at 56 cents a share, above estimates of 47 cents. Revenue climbed 1.6% to $1.67 billion. Advertising sales fell 0.5%.


More from Futures

GE Loses Its Spot on the Dow and 4 Other Stories to Watch Wednesday Morning

GE Loses Its Spot on the Dow and 4 Other Stories to Watch Wednesday Morning

Trump Threatens More Tariffs and 4 Other Stories to Watch Tuesday Morning

Trump Threatens More Tariffs and 4 Other Stories to Watch Tuesday Morning

Google Invests $550 Million in JD.com and 4 Other Stories to Watch Monday

Google Invests $550 Million in JD.com and 4 Other Stories to Watch Monday

Futures Tumble on Tariff Reports and 4 Other Stories to Watch Friday Morning

Futures Tumble on Tariff Reports and 4 Other Stories to Watch Friday Morning

Markets Wobble as U.S. Readies More China Tariffs

Markets Wobble as U.S. Readies More China Tariffs