CHICAGO — Anxiety-prone investors looking for safety in the stock market have sometimes found it in so-called widows-and-orphans stocks. At their best, they pay dividends for decades and bounce around a bit less when the markets convulse, as they have over the last week. For years, AT&T was the textbook example. Procter & Gamble was another.

But it is rare to meet actual orphans with stock portfolios, let alone ones who have hung on to their investments for nearly half a century.

After Barnaby Dinges lost his father at age 7 and his mother at 9, a stranger, Sanford Kovitz, volunteered to keep an eye on his money. A young father himself, Mr. Kovitz had heard about the situation and thought he could help.

Nearly 50 years later, the two are still at it, having shepherded Mr. Dinges’s portfolio through private school, college, parenthood, divorce and assorted hiccups and triumphs along the way. They bought here and sold there, but mostly they held, not just onto certain stocks but to an old-fashioned idea — that a very long-term relationship with an adviser looking out for your best interests can pay returns for both parties.

Their buddy act began in 1968. Mr. Dinges’s father, an ad man, had died two years earlier from leukemia; his mother, a fact-checker for Playboy magazine, died that year from cardiac arrest during surgery for an ulcer. Mr. Dinges and his older brother, Casey, had no living grandparents and no immediate family who could take them in.

For the first few weeks after their mother’s death, a different adult came to their apartment on Wrightwood Street here to spend the night and keep an eye on the boys. Often, the brothers had never met them. “All these young women,” Barnaby recalled. “They could have been Playboy bunnies. I have no idea who they were.”

Fortunately, life insurance proceeds formed the bulk of an inheritance. Some of it (plus the boys’ Social Security checks) went to pay for living expenses and cover home renovations for the family that eventually took them in. But roughly $100,000 was left over, and someone needed to step in to try to make it last long enough to keep the boys at their private school and perhaps pay for college.

Mr. Kovitz was a lawyer and trust officer on LaSalle Street, the Wall Street of Chicago. He received a call from a fellow lawyer about the boys, and a meeting ensued.

“It’s funny seeing your gray suit, because what I remember is a guy in a gray suit,” recalled Mr. Dinges, who is now 56 years old, in a joint interview last month with Mr. Kovitz, whose office is still on LaSalle Street.

“It’s not that gray suit!” Mr. Kovitz, 86, interrupted.

“I thought Sandy was a cool name and that he was a cool guy,” Mr. Dinges continued. “He was going to look after my brother and me and was going to give us advice about financial stuff. I remember being very soothed by your presence and it calming me at a time when I was not calm.”

This was the first time that Mr. Kovitz had pre-teenagers for clients, and he set about explaining things to them in plain English. “We set out to nurse these funds,” he said. “I knew we had to be careful, because there was a long way to go to get them to some kind of adulthood where they could fend for themselves.”

Soon, the boys were learning about buying investments in blue-chip companies and holding them for a long time. “I was for some reason fixated on this Philadelphia Electric corporate bond,” Casey Dinges said. “It blew my mind that you could have something with a 30-year maturity date.” He sold it before then to make a down payment on a townhouse outside of Washington. Mr. Kovitz eventually encouraged him to find an adviser closer to his new home.

His brother, Barnaby, however, mostly stuck around Illinois and learned what he came to refer to as the Sandy Kovitz test. An associate of Mr. Kovitz liked to be able to look out the 14th-floor window on LaSalle and see the headquarters of the companies whose shares he was buying, or come close at least. Back in the day, that meant McDonald’s, Sears, Caterpillar and Abbott Laboratories.

“Let quality management of companies in different industries do the job for you,” Mr. Kovitz said, outlining the rest of the bullet points that he still puts to use. “If you don’t try to make your fortune overnight and are patient, my experience has been that you will do O.K.”

Casey Dinges remembers Mr. Kovitz’s prediction that all of the baby boomers were eventually going to get sick. And his brother watched the stock of Abbott, a pharmaceutical company, rise and split and rise and split with regularity. “I don’t think the numbers are that important,” Mr. Kovitz said. “It’s not as if we made him a fortune. We couldn’t take that risk.”

But it was enough for grade school, high school and four years at Wesleyan University. Along the way, Mr. Kovitz encouraged him to spend $2,000 on a squareback Volkswagen to get him back and forth to college and talked him out of sinking $18,000 or so into a small apartment building near the University of Chicago.

There were bailouts too, like when Mr. Dinges showed up for his freshman year of college only to find that the school would not let him matriculate. There had been a tuition bill, but being 18 and all, he didn’t quite grasp its importance. “I remember I started crying, calling you like you were my dad, saying ‘Sandy, they’re not letting me in the dorm,’ ” he recalled, while Mr. Kovitz chuckled across the conference room table. “Somehow, within an hour, you were able to wire money.’”

Once Mr. Dinges was making and saving money, he stuck with Mr. Kovitz, who attended his wedding and helped him navigate the financial shoals of divorce. As a journalist and teacher, he didn’t earn much. (This is how I know him: He taught me seventh-grade history at the Francis W. Parker school, coached my basketball team and still makes himself available for wisdom and high fives over an occasional lunch.) His more recent work in corporate communications and issue advocacy has been more lucrative.

Still, Mr. Dinges has needed to stretch more than once, and he knew that he had achieved true financial adulthood when Mr. Kovitz allowed him to borrow money on margin against his stock portfolio for brief periods of time. “Not to buy more stock,” Mr. Kovitz is quick to emphasize. “And I had to know what we were doing it for or for whom. Some people, I wouldn’t let borrow a dime.”

Mr. Dinges was an unlucky child, but he caught a break with his money. Mr. Kovitz might have put him in Polaroid or some other faded star of the 1970s. That’s a real risk with old-fashioned stockpickers, but there were never any margin calls or forced stock sales to make good on the debt. In fact, some of the Abbott shares have been in Mr. Dinges account for more than three decades. (Over the last 30 years, Abbott’s stock has increased about 2,663 percent. The Standard & Poor’s 500-stock index grew roughly 966 percent during that period.)

As the pair near the 50th anniversary of their working relationship, Mr. Kovitz is slowing down a bit. He does not take on new clients and is making tentative plans to hand over his current ones to his son and his firm within a year or two. “But if I’m healthy,” he said, “I may go a lot more years now.”

Which would be fine by Mr. Dinges, who feels grateful for having such steady financial counsel. “When I talk to friends, it’s always a one-off, where they found this specialist and did this thing,” he said. “But I’ve always felt like I got exactly what I ever needed out of a Sandy Kovitz conversation.”