The idea of a Coffee Can is simple: You try to find the best stocks you can and let them sit for years. You incur no costs with such a portfolio, and it is simple to manage.
I share mine here: https://docs.google.com/spreadsheets/d/1tBrZEMFK9XNWxiqOxE8o...
You talk about a 5 year timeline, do you want a nice 5% return annually for 5 years? End up with 25k. Then you're looking at safer investments into index funds or maybe even high yield bonds.
Do you want it to be 100k or a mil? Then you're looking at trying to pick horses in investments. What will give you 5x return in 5 years, probably picking a single or handful of assets that could see major return. Could be stocks or something crypto. You could certainly yolo it wallstreetbets style and buy GME/AMC/whatever you think is the next meme stock that will pop. Could potentially get that return tomorrow, especially if you bought options and get lucky. I sold a covered call last month, whomever bought it could have potentially made 66x in 2 weeks. Had that been you and your risk tolerance is insanely high, you could have been a millionaire from that 20k (yes, I sold a AMC call, covered of course).
When to buy:
Use Warren Buffet's famous quote: "Be fearful when others are greedy, and greedy when others are fearful." If you're reading an article about why XXX stock is great, it's already too late to get in (meme stocks might be an exception).
If it feels like you have to buy XXX stock NOW or the price will go up, it's already too late. Take a few days to mull it over. Never FOMO.
When to sell:
Set stop losses. I set a stop loss at -10%. Diamond hands is a tactic people tell others to use when they themselves want to sell.
If you are at the point where your gains are good enough that you want to take a screenshot and send it to your friend--this is a good time to sell.
EDIT: Because I realize I answered the question "How would you invest 20k in the stock market?" and not "How would you invest 20k?": I would absolutely run from real estate right now. Prices are sky high due to inflation / lumber shortage / supply. You would be buying at peak.
If I had a spare 20k I would use maybe 1k to attend a conference and learn a skill which would help me earn more money in the future. I would put 15k into the stock market using above method, or crypto. And I would use the remaining money to fund a passive income online business.
Since you asked us what we would do personally: I would probably use some of it for something like an extra vacation and would put the rest on top of my current assets, divided up exactly like my assets are already allocated.
If you do not have any assets invested, you should probably first follow some very conservative advice about how to handle money in general. In the US I know of Dave Ramsey. This depends highly on where you are located because of social systems, retirement funds, taxation etc. To me it's strange, that the question even comes up. You should either be paying off debt or already have your asset allocation figured out.
By which I mean as working capital it might be enough to buy a lawn mower, some shovels, and a trailer and put you in the landscape business. But only dumb luck is going to turn $20k into $50k in five years without a lot of your time.
In real-estate or the stock market and finance in general, $20k is the short stack gone all in. It’s dumb money at the table.
So save it. Stay liquid. And maybe you will see some luck there to grab at some point.
There's nothing wrong with investing an amount like 20k for a learning experience but from a returns perspective, just working is almost certainly going to be a better avenue to increase your net wealth in that range.
Investing becomes a lot more useful the further the amount you have saved becomes more removed from your earning / saving potential.
[1] https://www.investopedia.com/best-options-trading-courses-51...
I would put that $20k into Ethereum (2.0) or any other crypto that is scalable, sustainable and has a large DeFi ecosystem around it.
People are estimating 2x-4x of the issued shares exist out there for this security and the large Wall St firms are losing runway where they can play bookkeeping games with failing to deliver shares, etc. Look for the "House of Cards" posts on reddit by a user named atobitt for a lot more detail.
Anyhow, the annual shareholder meeting is this Wednesday. Many retail investors have been encouraging proxy voting their shares because then the company will know that when say 200 million votes come in and only 73 million shares were ever issued that there is a significant problem. Setting aside fundamentals of the company and "valuation", if this situation is going on to the magnitude people claim, it is a massive short squeeze where the price could skyrocket.
I'll admit the research on reddit seems very tin-foil hatty but they have been interviewing trusted professionals that know about these things - lawyer, journalist and former DTCC employee and digging up as much data as they can to the point of FOIA requests to the SEC. Interview are up on youtube.
If nothing like that happens, there is a strong fundamentals case building where it could be the amazon of video gaming in a few years. Another option would be finding an entire stock market index fund as a solid fire and forget investment that will average decently over the long term.