William J. Ruane, 79, one of Wall Street's most successful investment managers and a philanthropist with an abiding interest in education and mental health, died Oct. 4 at Memorial Sloan-Kettering Cancer Center in New York.

He died of complications from lung cancer, according to David Poppe of Ruane, Cunniff & Goldfarb, of which Mr. Ruane was chairman. At the time of his death, he also was co-manager of the Sequoia Fund.

Mr. Ruane and partner Richard T. Cunniff founded their investment management firm in 1969 after raising $20 million from investors. Most of their customers came to them on the recommendation of Warren Buffett, Mr. Ruane's former classmate and close friend.

The company's Sequoia Fund, a mutual fund that has substantially outperformed the Standard & Poor 500 index since its inception in 1970, has been so successful that it has been closed to new business since 1982.

Mr. Ruane also served on numerous boards, including those of Geico, Data Documents Inc. and The Washington Post.

"What Bill Ruane did for The Washington Post was of incalculable value," said Donald E. Graham, chairman of The Post. "He helped with every acquisition we made during the time he was on the board and afterward."

Graham recalled Mr. Ruane as "outgoing and jovial" and as "a detail-minded investor."

"There was no such thing as a short conversation with Bill," he said. "Once he became interested in a problem, he wanted to know everything there was to know about it."

Mr. Ruane was born in Chicago and grew up in its Oak Park suburb. He graduated cum laude from the University of Minnesota in 1945 with a degree in electrical engineering. He enlisted in the Navy immediately after graduating and was on his way to Japan when World War II ended.

In 1947, he joined General Electric Corp., where he learned that engineering was not for him. "I'm a mechanical idiot," he told Forbes magazine.

He enrolled at Harvard Business School and found his calling when a professor urged his class to read the classic textbook "Security Analysis: Principles and Techniques" (1940). Although he knew nothing about stocks, he was impressed with the approach by authors Benjamin Graham and David Dodd to financial analysis.

Mr. Ruane recalled interviewing with a Wall Street investment firm and being told that college graduates were paid $35 a week, while Harvard Business School graduates were paid $37.50. "And there you have the value of a Harvard Business School degree in 1949," he remarked this year. "Things have changed."

After receiving his master's degree in 1949, he went to work for Kidder Peabody, where he stayed for 20 years.

In 1950, Mr. Ruane and Buffett sat in on a class Benjamin Graham taught at Columbia University, where they learned that the quality of earnings was just as important as growth in earnings. Buffett bought Berkshire Hathaway in 1965 and recommended four years later that his partners invest in Mr. Ruane's new fund. Many of them did.

In 1999, Forbes noted that if an investor had placed $10,000 with the fund at its inception and had reinvested the dividends, he or she would have had $1.1 million that year. Today, the Sequoia Fund manages more than $14 billion.

Long interested in urban education and mental health, Mr. Ruane in 1992 "adopted" a block of East 118th Street, between Fifth Avenue and Lenox Avenue in Harlem.

Called the Carmel Hill Project, it was a "comprehensive community initiative" that involved renovating buildings, bringing in health clinics and other community service programs and providing scholarships to every child on the block so all could attend a Catholic school three blocks away. He resolved to spend whatever it took to make the block a better place.

He also funded an Accelerated Reader program for 26 New York public schools and for 19 schools in Monroe, La., as well as schools on reservations. In addition, he created TeenScreen, a nationwide organization that tests teenagers for symptoms of depression and other suicide risk factors.

Survivors include his wife, Joy Ruane of New York; four children, William Ruane Jr. of Cambridge, Mass., Elizabeth Ruane of Burlington, Vt., Thomas Ruane of Washington, Conn., and Paige Ruane of New York; a sister, Patricia Lowry of Maui, Hawaii; and four granddaughters.

At the 2005 Sequoia Fund shareholders' meeting, Mr. Ruane offered two rules of investment, borrowed from his old friend Buffett: "Rule No. 1: Don't lose money. Rule No. 2: Don't forget Rule No. 1."