Advice from three of the world's most successful investors

Where and how to find yield has become a common theme in this market.

The main indexes hit record highs last quarter but political uncertainty, an indecisive Fed, and tightening margins have all caused swings for stocks.

These factors have led investors to question if now is the time to buy or stay on the sidelines.

The uncertainty was echoed Monday on CNBC's "Halftime Report" by three of the biggest voices in investing — Carl Icahn, chairman of Icahn Enterprises, DoubleLine Capital's CEO Jeffrey Gundlach and Appaloosa Management founder David Tepper weighed in on where they see opportunity and how they are positioning themselves now.

Icahn: Based on numbers HLF could be 'mother of all short squeezes'
Icahn: Based on numbers HLF could be 'mother of all short squeezes'

When it comes to the market, Tepper said he is "cautious," but not "outright bearish."

Right now he thinks returns are OK, but the outcome of the election could change that.

"The market will move in different ways" he said, depending on who wins the White House and who wins Congress.

The election's impact will also be felt in the credit market, as Tepper said its outcome will determine whether or not the Federal Reserve raises benchmark interest rates this December.

He said the economy is "at a point where they [the Federal Reserve] should raise rates," but if the market reacts negatively after the election, the Fed could be forced to once again leave rates unchanged.

Icahn agreed with Tepper when it comes to being cautious. "A lot of S&P companies are way overvalued considering the risk premium," he said.

Icahn said that finding opportunity in this market is difficult but there are companies that are "uniquely undervalued" like Cheniere, AIG and Xerox — all major holdings in his portfolio.

Icahn added that embattled Herbalife is also "undervalued" despite its 45 percent rally from the February 2016 low and a trade that has worked against his rival, short-seller Bill Ackman of Pershing Square.

"Bill Ackman [is] completely wrong," Icahn insisted. "I think Herbalife will be the mother of all short squeezes."

Gundlach: Investors should be in a defensive position
Gundlach: Investors should be in a defensive position

Shares of Herbalife are up more than 80 percent since Ackman made his now famous presentation in December 2012.

Never one to shy away from controversy, Icahn is standing by GOP nominee Donald Trump.

"I still support Donald Trump," Icahn told CNBC. "I'm not saying he's running a campaign the way I would run it, and I've said to him that he needs to stick to the issues."

Federal Election Commission data show that Icahn donated $150,000 to Trump's campaign in September.

DoubleLine CEO Jeffrey Gundlach also believes we're in a period of market uncertainty. But unlike Tepper, he doesn't believe the election is to blame.

Trading Tepper's big calls
Trading Tepper's big calls

"I actually don't think the election outcome is really all that important because I think both candidates will be caught up in the trend of fiscal stimulus and supporting fiscal stimulus," he told CNBC.

Gundlach also said the credit market is signaling investors to be cautious.

"I would turn particularly negative if the S&P closed twice below 2,130," he said. Hours after he spoke, it closed at 2,126.50 on Monday.

On the Fed, Gundlach believes Chair Janet Yellen may want to run a "high-pressure economy," and keep interest rates lower until unemployment reaches close to 4 percent.

He said the bond market is sniffing out fiscal stimulus, which means there could be an unfriendly environment for credit investors ahead.

Overall, Gundlach said, the days of negative interest rates are numbered and investors should expect steeper yield curves in the future.