The S&P 500, Nasdaq Composite Index, and Dow Jones Industrial Average are all at or near record territory. Investors have a renewed sense of optimism as the economy appears to be on solid footing, and market watchers still expect the Federal Reserve to cut interest rates in 2024.

For those who have been watching stocks climb higher from the sidelines, you might be inclined to learn more about ways that you can start putting your money to work. It might be disheartening knowing that you missed the market's rally -- but don't be discouraged. It's still a great time to be a new investor in 2024.

In fact, you can even beat the stock market experts. History says there's one ridiculously easy way to do it.

First things first

It's worth first pointing out that individuals need to make it a top priority to take care of their personal finances before even thinking about investing for the long haul. This means paying off all high-interest debt, like credit cards or personal loans.

Moreover, you should set aside enough cash to cover a few months' worth of expenses as an emergency fund. The exact dollar amount will vary depending on your situation. But this provides invaluable peace of mind should anything negative happen.

Once these things are handled, investors can then turn their attention to the stock market.

investor looking at charts on paper, smartphone, laptop.

Image source: Getty Images.

The best path

It might come as a huge shock, but according to S&P Global's latest scorecard of U.S. equity funds, an eye-popping 90% of domestic funds over the past decade lost to the S&P Composite 1500 (a broad market index whose performance mostly tracks the S&P 500). If you stick to large-cap funds and compare them to the S&P 500, more than 85% underperformIn essence, people pay these professionals to underperform. It's crazy, but that's how the investment management industry works.

There are a few reasons for this. A big one is high fees that eat away at any outperformance. Some advisors may try to time the market or chase hot trends to attract or retain customers. Some overdiversify, diluting their best ideas with mediocre ones and creating a portfolio that basically hugs the benchmark. And finally, some are simply looking to preserve wealth rather than grow it. That might make sense for some investors, but you can do better, with minimal effort (and expense).

For a new investor, then, the best course of action to beat the stock market experts is simply to buy an index fund. Warren Buffett, widely regarded as the greatest investor ever, even recommends that this is what most people should do.

There are lots of low-cost options available, like the Fidelity 500 Index Fund, Schwab S&P 500 Index Fund, or the Vanguard 500 Index Fund Admiral Shares. They provide investors with exposure to 500 of the largest and most profitable businesses in the U.S. This is essentially a bet on the ongoing growth and innovation of the American economy, which has historically been a very lucrative decision.

If investors want to supercharge their returns, dollar-cost averaging, or adding more capital on a monthly or quarterly basis, can work wonders for your portfolio. An initial $1,000 investment, in addition to $50 monthly inflows, can result in an ending balance of $12,667 over a decade, assuming the 10% historical gain of the S&P 500. That's an extremely positive result that would put you well ahead of the pros in the industry.

But what about investing at a time when the market is hitting new records? Again, go back to the idea that time in the market beats timing the market. According to analysis by Nick Maggiulli of Ritholtz Wealth Management and the blog Of Dollars and Data, even if you put money in stocks at record highs, the outcome over the next 10 years would be about in line with historical averages.

Investing at market highs might feel like the wrong move. But if you maintain a long-term time horizon and have patience, you should do remarkably well. And your returns will even beat most professional money managers out there.