Martha Stewart's sentencing was good news for stock in the company that publishes magazines, produces television shows, and licenses products in her name.

Martha Stewart Living Omnimedia Inc. has been whipsawed by its founder's legal troubles, with advertisers in particular pulling back since her conviction. But yesterday, its shares soared 37 percent to close at $11.81 per share, even as its founder was sentenced to five months in prison. Yet with the rally, stock in Martha Stewart Living Omnimedia remains well below its $39.75 high in 1999; before Stewart's legal entanglements began in 2002, it traded near $20.

The reasons for the upswing: Stewart's sentence was more lenient than many analysts expected. Some analysts theorized that a "short squeeze" was underway, in which all of the investors who thought the company's stock would continue to decline had to unwind their positions at once, driving up prices.

The most significant change for shareholders, though, may be an end to the uncertainty that has haunted the company through the investigation and trial of its progenitor. The company issued a statement yesterday expressing sympathy for Stewart and saying that the sentencing is "an important step toward closure for MSO."

"Now people know what the downside is on how long she could be away, and there's some daylight on when she could be back involved with the company," Morgan Stanley analyst Douglas M. Arthur told Bloomberg News yesterday.

Company officials told investors in May that advertisers would not return until Stewart's sentencing. "It isn't over until it is over," said chief executive Sharon L. Patrick.

Stewart made remarks outside the courthouse yesterday that at times sounded like an advertisement for her company's products. "Perhaps all of you out there can continue to show your support by subscribing to our magazine, by buying our products, by encouraging our advertisers to come back in full force to our magazines," she said.

Stewart resigned as a director of the company earlier this year, following her conviction, and had already given up the chairman and chief executive jobs at the firm. She remains affiliated with the company as founding editorial director and owned more than 60 percent of Martha Stewart Living Omnimedia shares as of a June regulatory filing.

Given all those stock holdings, there was a silver lining on Stewart's sentencing. She may have to pay a $30,000 fine as part of her sentence, but as her company's stock rallied, the paper value of Stewart's shares increased by $95.1 million.

The paper value of Martha Stewart's personal stock increased by $95.1 million.