Warren Buffett says if you want to learn how to make money from the stock market you should look at how he made some money with two small real estate investments.
In an excerpt published by Fortune, from his upcoming annual letter to Berkshire Hathaway shareholders, Buffett writes about his purchase of a Nebraska farm and his investment in a retail property near New York University in Manhattan.
In both cases, he bought when prices were unusually low after bubbles had burst.
In both cases he had no particular expertise.
(Read more: Berkshire Hathaway's 15 biggest stock holdings)
And most importantly, in both cases he invested because he thought the assets would be increasingly profitable, not because he expected to sell at a higher price.
"With my two small investments, I thought only of what the properties would produce and cared not at all about their daily valuations. Games are won by players who focus on the playing field—not by those whose eyes are glued to the scoreboard."
He warns against "letting the capricious and irrational behavior" of stock prices make an investor "behave irrationally as well."
In addition, Buffett argues, "Forming macro opinions or listening to the macro or market predictions of others is a waste of time."
When he bought the properties in 1986 and 1993, economic projections didn't matter to him. "I can't remember what the headlines or pundits were saying at the time. Whatever the chatter, corn would keep growing in Nebraska and students would flock to NYU."
As for not needing expertise, Buffett recommends a low-cost S&P 500 index fund for nonprofessionals, to "own a cross section of businesses that in aggregate are bound to do well."
He also urges timid or beginning investors against going into stocks "at a time of extreme exuberance" and becoming "disillusioned when paper losses occur."
"The antidote to that kind of mistiming is for an investor to accumulate shares over a long period and never sell when the news is bad and stocks are well off their highs."
His bottom line fundamental advice: "Ignore the chatter, keep your costs minimal, and invest in stocks as you would in a farm."
—By CNBC's Alex Crippen. Follow him on Twitter