Every day, Wall Street analysts upgrade some stocks, downgrade others, and "initiate coverage" on a few more. But do these analysts even know what they're talking about? Today, we're taking one high-profile Wall Street pick and putting it under the microscope...

The stock market is barely in the green today, up the smallest fraction of a percent -- except for one stock in particular. With the trading day barely begun as of this writing, shares of AT&T (T -0.43%) are up nearly 2% already, helped by a bullish analyst note out of Swiss megabanker UBS.

According to UBS, you see, AT&T stock is "trading for all-time low valuations" right now, and it's a buy.

Here's what you need to know.

Red dial-style telephone

UBS makes an apparently safe call on AT&T stock. Should you pick some up? Image source: Getty Images.

Upgrading AT&T

In contrast to some other upgrades we've discussed so far this week, UBS' buy thesis for AT&T stock is surprisingly simple: "[A] mix of EBITDA declines, concerns over the debt load and secular issues" have investors running scared. "The Time Warner transaction and accounting changes have compounded these issues," explains UBS in a note reviewed today on StreetInsider.com, "leading to a loss of visibility for investors."

Unwilling to invest in an unknown, therefore, investors have sold off AT&T stock by a whopping 12.5% over the past year, resulting in nearly 30 percentage points worth of underperformance relative to the rest of the S&P 500. At a current share price that's just 6.6 times trailing earnings, AT&T stock is not only cheaper than its biggest rival Verizon (which costs 7.2 times earnings), AT&T is literally selling for an "all-time low valuation" -- and it's time to buy it now.

Fact check

Or so says UBS -- but is it right about that?

From one perspective, yes, UBS is absolutely right about AT&T stock selling for the best valuation ever. Looking back over the past 10 years for example, and using data mined by S&P Global Market Intelligence to do it, we find that AT&T stock has averaged a price-to-earnings ratio of just over 20.2 times trailing earnings over the past decade. (Actually, you can use S&P Global data to track the stock's valuation back as far as 1993 -- and AT&T has never been this cheap. But we'll stick to looking at just the last 10 years here to make the math more manageable.)

Even focusing just on the average low points the stock has hit, over the past 10 years, the lowest valuation AT&T stock has suffered in a given year has averaged 12.6 times trailing earnings. At 6.6 times earnings, therefore, AT&T costs nearly half its average lowest valuation of the last decade.

Which seems pretty cheap.

One way to value AT&T

But is AT&T stock cheap enough to justify buying it, even at 6.6 times earnings? That's where I'm less certain that UBS is calling this one right.

Consider, for example, how AT&T ended up with a P/E of 6.6. "EBITDA declines, concerns over the debt load and secular issues" have all played a role, no doubt, in scaring investors away from AT&T stock, and causing its share price to decline over time. But on the other side of the equation, trailing earnings results for AT&T include the effect of big one-time tax benefits AT&T enjoyed as a result of Donald Trump's tax reform.

Indeed, these tax benefits amounted to $14.7 billion last year, representing almost 50% of AT&T's $29.4 billion in reported net profit. Without those tax benefits, AT&T's trailing earnings would be much lower, and its P/E much higher. This is the real reason why AT&T is trading for "all-time low valuations" -- and the reason you should be cautious about using P/E alone to decide whether AT&T stock is cheap.

A safer way to value AT&T

Instead of valuing AT&T on its GAAP earnings, for example, consider how the stock looks when valued on its actual cash profits -- its free cash flow.

Over the past 12 months, AT&T generated only $19.1 billion in real free cash flow. While that's a pretty big number in its own right, it's significantly less than the $31.9 billion in net income the company claimed to have earned when factoring tax benefits into the equation. For every $1 in net income the company reported, it actually generated only about $0.60 in real cash profit.

Valued on free cash flow, AT&T stock sells for a market capitalization of 12.7 times FCF. Adjusted to account for debt, the company's enterprise value-to-FCF ratio is even steeper -- at $421 billion in enterprise value, the EV/FCF works out to just over 22.

Even with the stock's 6% dividend yield and 5% growth rate, I think that's about two times too much to pay for AT&T stock today -- and UBS is wrong to recommend it.