Someone once told me that the best time to buy stocks was twenty years ago and the second best time is today. I appreciate that sentiment (i.e. start investing early), but is that platitude really good advice? What if the stock market is overpriced whenever "today" happens to be?

The bad news is that there are times when stocks are clearly overpriced. The good news is that there are ways to deal with that reality and to tip the odds slightly in your favor. Here's how:

Invest on Mondays; Mind the value of stocks versus bonds; and Be brave when others are fearful.

The Stock Market Hates Mondays, Too

I automatically invest in low cost Vanguard funds every Monday because, for whatever reason, stocks sell more cheaply on Mondays than on any other weekday. I first learned of this phenomenon from Peter Lynch's 1989 book "One Up on Wall Street." Lynch reasoned that because companies release bad news on Friday afternoons, the market absorbs that bad news on Mondays. I find that hard to believe, but various studies support Lynch's observation. For example, NYU professor Aswath Damodaran concluded that virtually all stock markets (not just the U.S.) perform poorly on Mondays.

Source: Aswath Damodaran

It may seem arbitrary and silly to invest on certain days of the week, but if you're already making weekly investments, you might as well tip the odds in your favor.

This Ratio Is a Good Predictor of Stock Market Returns

I've spent years looking for a metric that would help me maximize my returns by "timing" when to enter, exit, and re-enter the stock market. Sadly, no luck. On the other hand, I did find proof that knowing when to buy stocks is easier than knowing when to sell stocks.

The chart below shows the "earnings yield" of the S&P 500 divided by the yield of the 10-year U.S. Treasury Note.

Data Credit: Robert J. Shiller

(To get the earnings yield of the S&P 500, I simply inverted the price to earnings (PE) ratio. For example, a PE of 25 could be written as 25/1. The inverse is 1/25, which could otherwise be written as 4%. I used Robert J. Shiller's cyclically-adjusted S&P 500 PE ratio to smooth out volatility.)

In theory, a ratio below 1.0 should be a big red flag: It means that stock investors are accepting an earnings yield that is lower than the guaranteed yield that a safe U.S. bond provides. And yet, this ratio stayed below 1.0 from 1984 to 2002. That's 19 consecutive years of red flags within one of the greatest bull markets in U.S. history! Bonds were a good investment during that time, but stocks were a great investment. This suggests that investors should have some stock exposure, no matter how overpriced the market seems. Nevertheless, this data suggests something else: when to jump into the stock market with both feet!

Look at how the S&P 500 has performed on a compound annual basis (with dividends reinvested) when you slice this ratio into ranges:

When the ratio was less than 1.0 , the median compound annual return was 10.02% ;

, the median compound annual return was ; When the ratio was between 1.01 and 1.33 , the median compound annual return was 11.40% ;

, the median compound annual return was ; When the ratio was between 1.34 to 2.0 , the median compound annual return was 12.88% ; and

, the median compound annual return was ; and When the ratio was greater than 2.0, the median compound annual return was 15.28%.

The more cheaply stocks are trading relative to bonds, the higher investor returns appear to be. Right now, this stock versus bond ratio is 1.12. History suggests that we can expect good, but not great returns from here. If we're lucky enough to see a ratio above 2.0 again, rest assured that I'll be turning over couch cushions and scrounging every cent to buy stocks.

The stock versus bond ratio is useful for relative comparisons, but it cannot predict future returns. I highlighted the median returns for each group, but that means that half the data set performed better and half the data set performed worse. My analysis spanned 1968 to 2017, using stock and bond data from January of each year. There are fluke years (both good and bad), but they didn't warp my findings because of the long time horizon that I used.

Don't Be Afraid When Stocks Go On Sale

The S&P 500 has only closed the year negatively 10 times since 1968. If you invested on the first trading day of the New Year following any of those losing years, your median compound annual return would be 10.81%. That's better than the 10.48% return that investing after a winning year would bring you. Don't sneeze at the small difference. A few basis points can compound to hundreds of thousands of dollars over long periods of time.

A down year, or any time the market falls by 10%, is often a great opportunity to invest. Sure, stocks may fall further. But, the U.S. stock market has been remarkably healthy over the long term. Colds are caught occasionally, but devastating illnesses are rare.

Investment opportunities usually abound when you see headlines like these.

Don't make the mistake of waiting for a down year or a 10% plunge, though. You might wait for decades and sacrifice precious time that your money could be compounding. Remember, your total return is more important than your annual return. So, seize any opportunity that the market gives you, but invest regularly in between. Like on Mondays, perhaps.

Disclosure: I/we have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours. I wrote this article myself, and it expresses my own opinions. I am not receiving compensation for it (other than from Seeking Alpha). I have no business relationship with any company whose stock is mentioned in this article.