He overturned the traditional approach to buying stocks by examining the relationship between risk and reward.Harry M. Markowitz, an economist who launched a revolution in finance, upending traditional thinking about buying stocks and earning the Nobel in economic science in 1990 for his breakthrough, died on Thursday in San Diego. He was 95.The death, at a hospital, was caused by pneumonia and sepsis, Mary McDonald, a longtime assistant to Dr. Markowitz, said.Until Dr. Markowitz came along, the investment world assumed that the best stock-market strategy was simply to choose the shares of a group of companies that were thought to have the best prospects.But in 1952, he published his dissertation, “Portfolio Selection,” which overturned this common sense approach with what became known as modern portfolio theory, widely referred to as M.P.T.The heart of his research was grounded in the basic relationship between risk and reward. He showed that the risk in any portfolio is less dependent on the riskiness of its component stocks and other assets than how they relate to one another. It was the first time that the benefits of diversification had been codified and quantified, using advanced mathematics to calculate correlations and variations from the mean.This breakthrough insight and its corollaries have now permeated all aspects of money management, with few professionals unfamiliar with his work.“Modern portfolio theory has gone from the halls of academia to investment management mainstream, or from gown to town,” Robert Arnott, chief executive of Research Associates, a large investment manager in Newport Beach, Calif., said in a videotaped interview with Dr. Markowitz.When Dr. Markowitz heard one of his peers describe how his work had brought “a process” to what had been, until the 1950s, the “haphazard” creation of institutional portfolios, he knew he deserved his reputation as the father of modern portfolio theory, he said.“That moment was one of these things where you feel a chill run up your spine,” he said. “I understood what I had started.”In 1999, the financial newspaper Pensions & Investments named him “man of the century.”Related work on investments led Dr. Markowitz to be regarded as a pioneer of behavioral finance, the study of how people make choices in practical situations, as in buying insurance or lottery tickets.Recognizing that the pain of loss typically exceeds the joy of comparable gain, he found it crucial to know how a gamble is framed in terms of possible outcomes and the size of the stakes.Dr. Markowitz won renown in two other fields. He developed “sparse matrix” techniques for solving very large mathematical optimization problems — techniques that are now standard in production software for optimization programs. And he designed and supervised the development of Simscript, which is used for programming computer simulations of systems like factories, transportation and communications networks.In 1989 Dr. Markowitz received the John von Neumann Theory Prize from the Operations Research Society of America for his work in portfolio theory, sparse matrix techniques and Simscript.His focus was always on applying mathematics and computers to practical problems, particularly involving business in uncertain conditions.“I’m not a one-shot Nobel laureate — only doing one thing,” Dr. Markowitz said in an interview for this obituary in 2014. Although he was 87 at the time, he was embarked on a monumental analysis of securities risk and return. The seminal 1952 paper, in The Journal of Finance, was expanded into his best-known work, “Portfolio Selection: Efficient Diversification of Investments,” in 1959.Harry Max Markowitz was born on Aug. 24, 1927, in Chicago, the only child of Morris and Mildred Markowitz, who owned a small grocery store. In high school he began to read the original works of Darwin and such classical philosophers as René Descartes and David Hume. In financial terms, Hume’s work lay behind the maxim that past performance is not a guide to the future.He continued on this track in a two-year bachelor’s program at the University of Chicago, where, inspired in part by Hume’s focus on the uncertainty of knowledge, he decided to pursue economics.It was in graduate school, where he studied under Milton Friedman and other eminent economists, that a chance conversation on possible dissertation topics led to his work applying mathematical methods to the stock market.The basic concepts of portfolio theory came to Dr. Markowitz one afternoon in the library while reading an investment book by the economist John Burr Williams.Dr. Markowitz was awarded the Nobel in economic science in 1990, sharing it with Merton H. Miller and William F. Sharpe.Sandy Huffaker for The New York Times“Williams proposed that the value of a stock should equal the present value of its future dividends,” Dr. Markowitz wrote in a brief autobiography for the Nobel committee. “Since future dividends are uncertain, I interpreted Williams’s proposal to be to value a stock by its expected future dividends.”But if investors were interested only in the expected values of securities, he figured, then that implied that the best, or maximized, portfolio would consist of the single most appealing stock.“This, I knew, was not the way investors did or should act,” he concluded. “Investors diversify because they are concerned with risk as well as return.”He set out to measure the relationships among a diverse assortment of stocks to construct the most efficient portfolio, and to chart what he called a “frontier,” where no additional return can be obtained without also increasing risk.At the RAND Corporation, during stints in the 1950s and ’60s, Dr. Markowitz worked on practical problems in American industry that required the development of simulation methods; he created the Simscript language to reduce their programming time.He went on to work for IBM and General Electric, where he built models of manufacturing plants. In 1962 he co-founded the California Analysis Center Incorporated, a computer-software company that would become CACI International.Dr. Markowitz’s first two marriages, to Luella Johnson and Gloria Hardt, ended in divorce. In 1970 he married Barbara Gay. She died in 2021.Mr. Markowitz is survived by two children from his first marriage, Susan Ulvestad and David Markowitz; two from his second, Laurie Raskin and Steven Markowitz; his wife’s son from a previous marriage, James Marks; 13 grandchildren; and more than a dozen great-grandchildren. He lived in San Diego.Dr. Markowitz in his office in 2012. “I’m not a one-shot Nobel laureate — only doing one thing,” he said in an interview in 2014.Sandy Huffaker for The New York TimesIn 1968 Dr. Markowitz began to manage a successful hedge fund, Arbitrage Management Company, based on M.P.T., that is believed to have been the first to engage in computerized arbitrage trading.Dr. Markowitz was a professor at Baruch College of the City University of New York when he was awarded the Nobel in economic science, sharing it with Merton H. Miller and William F. Sharpe. He also served on the faculties of Rutgers University, the University of Pennsylvania’s Wharton School, the University of California at Los Angeles and finally at the Rady School of Management at the University of California, San Diego.After submitting his landmark dissertation, Dr. Markowitz took a job at RAND and was fully confident that “I know this stuff cold” when he returned to Chicago in 1955 to defend it.Within a few minutes, however, Professor Friedman told him that while he could find no mistakes, the topic was extremely novel. “We cannot award you a Ph.D. in economics for a dissertation that is not economics,” he said.At this point, Dr. Markowitz recounted, “my palms began to sweat” and he was sent into a hallway, where he waited for about five minutes.Finally, a panel member emerged and said, “Congratulations, Dr. Markowitz.”Dr. Markowitz insisted that he had not suspected the joke.Alex Traub More