A number of ASX shares, including the S&P/ASX 200 Index (ASX: XJO) as a whole, are trading close to all-time highs.
In the last few weeks, we've seen names like Macquarie Group Ltd (ASX: MQG), Wesfarmers Ltd (ASX: WES), Goodman Group (ASX: GMG), WiseTech Global Ltd (ASX: WTC), Aristocrat Leisure Limited (ASX: ALL), REA Group Ltd (ASX: REA), Pro Medicus Ltd (ASX: PME) and CAR Group Limited (ASX: CAR) all reach share price records.
While shareholders will be very happy with those gains, prospective investors may be wondering whether to sit out or invest.
After all, one of the most famous investment sayings is "buy low, sell high". It doesn't mention about buying high.
There are a few things to keep in mind with this situation, which I'll talk about below.
What's driving the gains?
One of the most used financial metrics to compare businesses is the price-earnings (P/E) ratio, which essentially tells us what multiple of earnings the share price is trading at.
The share price of an ASX share can rise due to two different factors: a rise in earnings or a rise in the earnings multiple.
For example, if a business grows its earnings by 10% over a year and the P/E ratio stays the same, the share price could rise by 10%.
If the P/E ratio of a business rises from 20 to 22 (a rise of 10%), and the earnings didn't change, then the share price would have risen 10%.
Many of the companies I mentioned earlier have seen both a rise in profit and an increase in their earnings multiples over the past year. Macquarie is an exception because its earnings aren't rising at this stage.
So, should we still invest in these ASX shares? I think there is one key reason to consider it.
Good businesses keep rising over time
When I think about many leading local (and global) businesses, they have a history of delivering earnings growth over time. Great companies don't typically turn rubbish from one year to the next – they're usually capable of continuing their successful expansion over the long term, reinvesting profit at a good rate of return.
Names like Pro Medicus, WiseTech, and REA Group seem to have a long earnings growth runway from here.
The best ASX growth shares hit numerous all-time highs over their journeys as they become much larger businesses. So, simply hitting an all-time high is not necessarily a worrying sign.
Don't need to go all-in
However, I'm not saying we should invest all our money in businesses at all-time highs, particularly when multiple ASX shares are hitting all-time highs simultaneously.
It's reasonable to have a little bit of patience, in my view, though I wouldn't sit on the sidelines forever.
We can also decide to use diversification as a risk mitigation strategy – spreading money across a few quality businesses could be a lower-risk decision than putting the money into one stock. An exchange-traded fund (ETF) could be a good diversified investment to consider as well.