Here's the short answer: no. You should not remain in 100% stocks for your entire career.
For the longer answer, you'll have to read the whole piece - and no, the answer isn't because I believe typical people can "time the market". The real answer boils down to a difference in preferences, in that different investors will have different goals due to different stages in their career and life.
Okay, let's get into it.
Why Would Someone Even Suggest an 100% Stocks Strategy?
Easy - over long enough time periods, the American stock market has always returned a positive result, even accounting for inflation (measured in CPI - which likely overstates inflation due to new inventions/technology). We have a calculator which demonstrates as much (it's only updated through 2012 - maybe we'll make a new version soon):
The results make it clear - over a 40 year period, for every rolling 40 years from 1871 - 2012 in the calculator's database... the stock market returned a positive result, more than inflation could erode. Even if you're trying to retire in your early 40s, 20 year returns were almost entirely positive, as well.
Now you can see the answer shaping up: 100% stocks would have failed to match or beat inflation over certain shorter time periods, especially as those time periods themselves got smaller and smaller. That is, over relatively short holding periods such as a year, stocks returned less than inflation as much as 32% of the time - ouch.
Nice Data... But What About Sample Sizes, Fees, and Other Things?
The first issue is an obvious one - the data for the S&P 500 comes from Robert Shiller, and it is constructed back to 1871 (before the S&P, let alone the S&P 500, even existed).
That means we don't know a ton about the earlier days, and we can't speak too definitively about the numbers we're seeing.
I've done some poking around and would like to eventually maintain some historical data on the fees investors paid, but suffice to say you're paying a lot less now to invest in broad stock markets. That's both because logistically it's easier: index investing is in vogue, ETFs and mutual funds track the indices, competition and a myriad of other reasons. There also are, quite literally, less fees charged on investments in general nowadays: we made some fee and tax estimates in our S&P 500 periodic investment calculator, but suffice to say you're paying a lot less in fees and taxes now buying mutual funds in your 401(k) than previous generations buying individual stocks over the phone from their brokers. (And they bought them at higher tax rates, too, quite often.)
We've really only got, in essence, "one sample" of United States data.
With backwards looking studies like this we can pull tricks like using rolling returns, but stocks are correlated well to recent results, so when you look at major financial crashes or other events in isolation you can only look at, say, the Great Depression or the Great Recession.
One solution to the small sample size problem is to use foreign country stock market results - but even worldwide stock markets correlate (and have become even more interconnected recently). Wade Pfau, in particular, has published some excellent papers on foreign stock returns using foreign equity markets, which we highly suggest you check out while thinking over this article.
Even with all those caveats, the United States really is different. We're still the global hegemon and have been since World War II - so an extended stock market decline in the United States on par with, say, Japan's last generation would have larger worldwide consequences than Japan's.
So, even with lots of historical stock data, it's possible we still don't know enough to draw firm conclusions on the safety of the stock market in America. And yes, you can get around some of that by diversifying globally - 100% stock doesn't mean 100% American stock, let alone 500 companies in America!
Economic Preferences: Why Your Portfolio Should Differ from Millennials' Portfolios
More importantly, let's talk about preferences... since they are more important in this answer than arguing over whether our data is good enough.
To make this discussion simple simple: what were your thoughts on investing at 21 years old? How about 64? (If you can't remember or know, just imagine.)
A twenty one year old has an entire career ahead of them. If a 21 year old makes dumb mistakes in volatile securities, sells too early, or hops between dead-end jobs, there is still time to fix it.
A 64 year old doesn't have that luxury. A 64 year old generally has more responsibilities - probably a much larger family, a house, possessions, a spouse, chronic health issues.
A 21 year old is mostly potential.
The 21 year old will spring back from an era of under-performing investments... and will even do better in many cases (assuming an eventual recovery) since they will acquire more securities at a lower valuation. In fact, look at how that volatility stacks up over years: returns are much less volatile and more predictable over longer time periods:
A 64 year old might not have time for the recovery. That's why it's expected that older workers start to scale back on equity later in their careers: while they don't cut to zero, it's nice to have some 'predictable' portion of a portfolio - something that bonds can provide if held to maturity. (Yes, even if those predictable returns are quite low.)
Don't Invest Like Your Kids. Don't Go 100% Stocks Your Entire Life.
Yes, different life stages are the main argument not to be in 100% stocks for your entire career.
Staying 100% in equities is fine for the first half of your career, but older workers and those nearing retirement certainly can give up some returns for safer investments such as bonds and equity like instruments. That doesn't mean 0% stock - we can plan on our retirements lasting a long time nowadays - but it certainly means you should leave the 100% stock portfolios to the youth.
Okay, so how long should... or could you remain in 100% equity?
Probably later than people do nowadays, at least into your 30s: humans in America are living longer nowadays, and you can balance job and career stability against portfolio volatility.
Unless you are one of the perhaps 3% of people who can actually time markets (if they exist - but you probably aren't and that's okay), it's best to just base your strategy on the historical returns. That's a discussion for another article, but you could use one of those formulas that says "100-your age percent in equities" or "120- your age" or "60/40 when you hit 40" or even just use a target date fund. If you're constructing the portfolio on your own, definitely think about geographic diversification and other volatile (read: possibly rewarding) asset classes like real estate too: there's no need to limit your sights to the S&P 500 or just the US in general.
But, yes, I would be very suspicious of advice arguing to stay in 100% stocks no matter where you are in your career. Argue your side in the comments!