President Barack Obama did his best imitation of a CNBC market analyst Tuesday, suggesting this week’s market swoon is a good time to buy stocks.

Responding to a question about the suffering Dow, Obama said, “What you’re now seeing is profit and earning ratios are starting to get to the point where buying stocks is a potentially good deal, if you’ve got a long-term perspective on it.”

That’s tricky territory for a chief executive. Presidents usually steer clear of dispensing anything that sounds like an Oval Office stock tip, mindful that their very words can shake the global markets.

Not only that, but Obama’s team has repeatedly cautioned reporters against judging him by the ups and downs – and lately downs – of the stock market, scraping 12-year lows.

Then there’s the more practical issue — it’s famously difficult for investors to “call a bottom,” or predict the very moment at which a downturn reverses course and buying stocks is, in fact, a good idea.

Obama’s advice came a day after the Dow Jones Industrial Average dropped nearly 300 points, but it was down only slightly Tuesday, a 37-point dip to 6726.

“It sounds like he’s been listening to his good friend Warren Buffett,” said Shannon Zimmerman, a senior analyst and advisor at The Motley Fool, a financial services company based in Alexandria, VA. “He might be a value investor himself.”

Zimmerman largely agrees with Obama’s take on the market. “Unless you think Depression 2.0 is under way, if you are a long-term investor, the goal is to buy value on the cheap and now is a good time to do it.”

The challenge for Obama is that the stock market could still decline substantially, in which case his comments could become an embarrassing reminder of bad judgment.

And of course any voters who follow his advice today – and lose money – won’t be pleased.

Obama’s statement was carefully hedged. The president said that buying stocks is a “potentially” good deal. And he added the caveat that he was looking at the “long-term perspective.” And he noted that he doesn’t pay attention to the stock market’s “day-to-day gyrations.”

Later in the afternoon, White House press secretary Robert Gibbs faced questions about Obama’s comments, including from one reporter who asked if the president was serving as the nation’s “first stockbroker.”

Gibbs was quick to note the president’s caveats, emphasizing them with his voice as he repeated the president’s statement: “Potentially, if you look at the long term.”

“It’s not his job to comment on or react to what the market does up and down on any given day, but instead to look at the longer term, at the longer horizon at what can be done in this country to meet those challenges,” Gibbs said.

Maybe the president’s comments should carry the same disclaimer that mutual funds and investment professionals include in their advertising: “Past performance is no guarantee of future results.”