Some if it is time and experience. Seeing markets come and go, seeing valuations come and go. You could perhaps study historical markets to gain some of that, but there is no better teacher than going through it (including taking some beatings along the way, along the process of learning and instilling discipline).

The absolute easiest things to look for (things most anybody can do), is growth vs valuation, along with having enough of an understanding of the business you're buying part of, to know whether they have an enduring position in their market, whether they have a moat or edge that isn't going to easily vanish. It's important to understand the context of the business you're buying into. Ultimately if you're going to self-manage, you have to decide what kind of ratio on growth vs valuation you're willing to accept, what's too high. These are largely subjective decisions, there is no right or wrong answer in most cases, only answers that entail more or less risk (the worse the ratio (eg high valuation + negative growth), the closer you get to it being an objectively wrong, dangerous answer though). Personally I prefer a balance on that equation. I'm a value investor, and it's commonly thought that value investing is a conservative, low return approach, however that's not inherently the case, that's up to the investor's approach (Benjamin Graham was a cigar butt value investor, looking for a last puff on cheap stocks, and his approach produces far lower returns over time than Buffett's approach to value investing). If a stock has a medium or high valuation, it can be a great value proposition if the necessary growth is there as a proper offset.

For example, if you go back to December 2018, Facebook was trading for around a $370 billion market cap, around 14.8 times operating income for that year. Why didn't more investors see that opportunity? It should take only a few minutes at most to run a basic extrapolation of a modest growth rate and see how that Facebook value proposition would end up a few years into the future. And yet, sentiment on the stock was irrationally bearish. That's nothing more than emotion, herd behavior, and it's extremely common. It's investors listening to other low-value opinions, it's Wall Street money being the typical followers that they are. People are generally terrified to stand apart on any decision, much less an investment. Many of those investors end up being the desperate sellers you want to buy from as they sell you FB at $137. They have no idea what they're doing, they have no idea when to buy or sell. And that's true of most of the professionals on Wall Street, they're almost all clowns (very highly paid clowns, because they're operating in a protected cartel). Was Facebook's social monopoly - their moat, their edge - going to vanish soon circa December 2018? That was an absurd, silly, borderline stupid premise, and yet it was a commonly floated notion; there was wildly bearish sentiment going around at the time - and yet back in objective land, where you always want to remain, their business was still firing soundly. So if an investor could brush away the irrational people spewing their emotional bias about FB, you could focus on the actual business and what it was actually doing, and run some very straight-forward projections into the future (even being conservative about it).

I'll give you another obvious example from my perspective. In March I posted here about which stocks I thought were interesting during the crash. I argued about Square and why I liked it. For that stock I looked at a few things. They did $4.7b in sales in 2019 and their market cap was down to like $17-$19 billion during the crash, so it was trading for around four times trailing sales with a solid growth profile (and, in theory, a lot of growth ahead of them, as they were still relatively early into their growth phase). Their operating profit/loss picture had persistently improved as well, they weren't at any risk of bleeding to death. Now, that's a laughably obvious value opportunity, that's dirt cheap value. That's a margin of safety or moat of safety that is massive, a lot of things would have to go wrong for Square to not be a great buy at that price. The calculation when you input all of that, including its business context (putting in risk for the pandemic), is that they could probably see their sales fall by a lot during the pandemic and their growth rate plunge and it'd still be fairly valued at near a $18b market cap with maybe some further downside risk of 1/3 from there if the damage were really bad. And then you'd have to believe they weren't going to resume growth, that they'd never get back up, to think the position would be really dire. That easily goes into the low risk camp.

Most stocks and situations aren't so obvious, so easy. The principle is the same though, it just takes more effort, thought, measurement, well considered projection, to reach a conclusion about the price you're paying vs the value you're getting. Start by asking: what value am I getting for my money? What value is represented behind that price. That includes the business comprehensively, its prospects, its growth near-term, its potential or likely growth longer term, its risks; and often it can include externals, depending on the business (is this business depending on a trend sustaining, on a commodity price remaining high/low, on politics in China, on hurricanes in Florida, and so on).

Getting really good at rapidly extrapolating with multiple outcomes is a great skill to acquire. Take a stock, absorb its P&L statements from the last 3-5 years or so, learn some about its business, and run some scenarios in your head (or write it down, whatever works). It's a training exercise, and over years you get to mentally compare your projections vs reality, and you can adjust your mental models if you're missing by too great of a margin about how you gauge such things, how you extrapolate forward. Over time you learn some things - risks, potential upsides - to look out for in businesses, to put into the calculations, that you maybe didn't know in the beginning. Did you include a variable and apply a discount for the potential that corporate income taxes might increase (and is this corporation's earnings primarily domestic, like an airline or bank)? Etc etc. Eventually you can look at the profile of a company, its valuation and P&Ls, and get a great sense almost immediately whether it's in your risk wheelhouse, on what value its presenting at the current price.

Run a value calculation on a bubble stock. What value is Snowflake presenting to me at a $82 billion market cap? That when it finally gets around to $3 billion in profit, it'll have a 27 PE ratio and probably low growth to match, all just to get it to where it's already at. What do I think its growth will look like in the century it finally gets there? Why should I pull returns so far forward for that stock, what extraordinary value am I getting to make up for the hyper price I'm paying? When Salesforce had a $82 billion market cap back in 2017, they were set to do $8 billion in sales that year. Snowflake presents something around a 20x worse value proposition than 2017 CRM (when you include their horrible burn rate and dramatically lower sales). Who the hell in their right mind would go anywhere near that? It has disaster written all over it (or at best, extended mediocre returns). And 2017 CRM wasn't a steal, that was a rich valuation. Snowflake requires that you pay an extreme price for growth. That's where an investor has to decide what ratios they think are acceptable; place those settings in the wrong place and you increase the odds of getting crushed, getting trapped in a lost decade, or taking a haircut you have to potentially spend years to recover from. Do I think I can buy Snowflake in the future at a steep discount to the $429 highs it previously hit? I wouldn't be surprised if it can be picked up in the future below $100, possibly far below that. Do I think this market's hyper valuations will persist forever? No. And you can go from there. Inevitably something will crash the stock, something won't go right, growth will be weak for a year or multiple quarters, any number of a thousand things, and it'll tank the stock hard, and they're priced for perfection. Snowflake has to execute to perfection for the next decade, non-stop, to prevent that stock from tanking at some point, and even then the market may kick their feet out from under them regardless. Do I think it's likely they can execute like that for a decade? No, hell no. They'll have their Qwikster moment too, and if they're lucky they won't go out of business (classic dotcom bubble scenario, high burn rate, market crashes, economy tanks, business vanishes; the supposedly impossible happens).

Why are people buying Tesla at $780 when they could have had it for under $180 a year ago? Where were these people a year ago? It's a great buy at four times the price and wasn't back then? Wild irrationality, a complete failure to understand anything about Tesla, a failure of due diligence, people generally buying things having no idea what they're doing. The market is always filled full of investors looking to buy your high priced stock at the wrong time, and later they'll be begging you to buy it from them at 10% or 20% the price. Rinse and repeat, it never stops happening, it will never stop happening, it's standard issue human behavior, and you can generate consistently great returns taking advantage of that fact, so long as you can control yourself and maintain discipline about your behavior during times of manic greed or intense panic (because the other people sure can't).