Robert W. Kleinschmidt, whose Tocqueville Fund outperformed 90 percent of competing mutual funds in the past year, is selling shares of energy and natural resources companies and buying technology stocks such as Microsoft Corp.

Kleinschmidt shed all his shares of Dutch oil field service company Core Laboratories NV and pared his position in integrated oil company Murphy Oil Corp. of El Dorado, Ark., as oil prices broke the $50-per-barrel threshold. He also cut his stake in Phelps Dodge Corp., the world's No. 2 copper producer.

"The big run in these companies is probably over," he said in an interview from his office at New York-based Tocqueville Asset Management LP, which oversees about $4 billion for clients.

Kleinschmidt, 55, is investing in companies he previously shunned -- technology companies. He expanded the fund's stake in Microsoft Corp. in March, four months before the company announced plans to pay a $32 billion dividend to investors. He purchased shares of Intel Corp. in July after analysts at Wall Street firms including Morgan Stanley lowered their investment ratings on concern that profit margins were narrowing.

The $145 million Tocqueville Fund rose 24.5 percent in the past year, exceeding the 11.4 percent advance of the Standard & Poor's 500-stock index, including reinvested dividends. The fund gained at an annual rate of 6.5 percent in the past five years, compared with the S&P 500's 1.3 percent drop.

Kleinschmidt searches for companies considered out of favor by most investors. He seeks those with promising earnings prospects that generate so-called free cash flow. It's a "contrarian-value" approach, to compete against funds such as the $37.6 billion Fidelity Contrafund managed from Boston by William Danoff. The Contrafund rose 17.5 percent in the past year.

Kleinschmidt, a former economics professor at Fordham University in New York, is selling shares of companies including Murphy Oil and Phelps Dodge because he expects the rally in the commodities markets to end. He bought the stocks in the late 1990s. Crude oil for November delivery closed at $50.12 per barrel Friday on the New York Mercantile Exchange.

"This is definitely a good time to be getting out," said Michael Lynch, 50, president of Strategic Energy & Economic Research, a consulting firm for oil companies in Winchester, Mass. "This is as high as we will likely get."

Energy stocks accounted for 9.7 percent of Kleinschmidt's fund on Aug. 31, down from 12.1 percent in April.

Kleinschmidt's view contrasts with those of investors such as Boone Pickens, who oversees more than $1 billion in energy investments at BP Capital LLC in Dallas. Citing demand from the United States and China, Pickens said this week that crude oil prices are more likely to climb to $60 a barrel than fall to $40.

Kleinschmidt bought shares of Microsoft, the world's largest software maker, at about $25 in March. Microsoft, now trading at $27.65, is the fund's third-biggest holding, making up 3 percent of the fund at the end of August.

Ned Riley, chief investment strategist at State Street Global Advisors in Boston, said technology stocks are unpopular because of lower expectations for corporate profits.

"We've moved back to fear and anxiety," Riley, 59, said in an interview. "That's a healthy environment for a contrarian. You really want most of the Street on the opposite side of your position."

Kleinschmidt spent two semesters teaching at Fordham in 1974 and 1975. Before that, he taught graduate-level economics for students of Adelphi University of Garden City, N.Y. To afford to live in New York, he abandoned academia for Wall Street.

Teaching "was a great profession for someone with a trust fund, but first I had to make enough money to have one," said Kleinschmidt, who has degrees from the University of Wisconsin at Oshkosh and the University of Massachusetts at Amherst.

From 1997 to 1999, the Tocqueville Fund underperformed the S&P 500 as Kleinschmidt favored what he called "mundane industries" over technology companies.

His bet paid off. Shares of Murphy Oil jumped 52 percent last year, and in July the company reported that second-quarter profit more than quadrupled, buoyed by higher oil prices. Its stock closed Friday at $85.76 per share.

Shares of Newmont Mining Corp., the world's biggest gold producer and the fund's second-largest holding at the end of August, surged 67 percent last year and 52 percent in 2002 as gold rallied. The stock, which ended the week at $45.04 per share, is down 6.3 percent this year.

"We thought the boring industries like steel, oil and zinc could be attractive," said Kleinschmidt, who has managed the fund for more than 12 years. "Some of these commodities were selling at multiyear lows."