Are you ready to get started investing? Here are the things you need to know.

"Never bet against America." That's what Warren Buffett recently told CNBC when he was asked about incoming President Donald Trump, and what his expectations are for the stock market under the new administration. Buffett's thoughts on how to invest while Trump is in office are simple -- keep the long haul in mind.

Warren Buffett

Warren Buffett. Image source: The Motley Fool.

Buffett thinks America will be just fine

Buffett once remarked that a big reason he loves Coca-Cola as an investment is because a "ham sandwich" could run the company. In other words, the wonderful business that is Coca-Cola is bigger than any one person.

It seems that Buffett has similar feelings about the United States. While Buffett was an outspoken Hillary Clinton supporter during the campaign, he doesn't necessarily think Trump is going to throw the stock market into chaos or cause the next Great Recession. As he said, "America works ... I've said this before, it'll work wonderfully under Hillary Clinton, and I think it'll work fine under Donald Trump."

In his most recent letter to Berkshire Hathaway (NYSE:BRK.A) (NYSE:BRK.B) shareholders, Buffett said: "For 240 years it's been a terrible mistake to bet against America, and now is no time to start." At the company's annual meeting, Buffett pointed out that Berkshire and its investment strategy have done just fine in a variety of political and economic climates, and will continue to do so.

How to invest

Investors looking for direction in 2017 should follow some of Warren Buffett's time-tested investing principles.

For starters, always invest with the long term in mind. "Our favorite holding period is forever," is a popular Buffett quote. This doesn't mean that he actually holds all the stocks he buys forever -- in fact, Berkshire Hathaway sells stocks regularly. Instead, it's his way of recognizing that since the market has an inherent upward bias over time, the best way to invest is to buy high-quality companies at fair prices with the intention of holding onto them for decades.

In his CNBC interview, Buffett said he doesn't know where the stock market is going in the next year or two years. Nobody does. There are simply too many variables that contribute to the market's performance. Here are my own predictions for 2017, and why they'll probably all be wrong. However, he does know that "it's going to be higher 10 years, 20 years from now." For this reason, I suggest a minimum 10-year investment time frame if you're going to buy stocks.

Also, don't worry about whether the market is "expensive" or "cheap." Many people will tell you the stock market is expensive because the Dow Jones Industrial Average is close to 20,000. This is nonsense. For one thing, the market could easily continue to climb in the right economic environment, or it could plunge 10% or more in 2017 if things don't go well. Like I said, nobody knows.

What you should care about, as I alluded to earlier, is whether the individual companies you're investing in are trading at a fair price. For example, Berkshire bought a considerable amount of Apple and Phillips 66 stock in 2016. Apple was (and still is) trading at a far lower earnings multiple than the market average, and Phillips 66 is a great energy business, positioned to make money no matter what the price of oil does.

Also, it's a good idea not to buy all the stock you want at once. For example, if you want to buy Apple and have $10,000 to invest, maybe spend $2,500 now. In a couple of months, if Apple still looks attractive, invest more, and so on. Then, you are taking advantage of dollar-cost averaging, which can help reduce your risk in the event of market declines, and help you capitalize on low prices when stocks are cheap.

Stock-picking might not be the best idea

As a final piece of Buffett wisdom, if you're not comfortable picking stocks, take that previous piece of advice, but dollar-cost average into a low-cost S&P 500 index fund like the Vanguard S&P 500 ETF (NYSEMKT:VOO). The S&P 500 has historically produced average total returns of more than 9% per year, and this is a perfectly good way to bet on American business for most investors.

Having said that, if you have the time and desire to properly and thoroughly research stocks, go for it. With through analysis and smart diversification, it's entirely possible to beat the market over time. If not, it's perfectly fine to let the long-term power of the market do the work for you.

Before investing in stocks, here is some advice to help beginners choose the right ones.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.