21st Century Fox, the media empire controlled by Rupert Murdoch and his sons Lachlan and James, may be the ultimate Teflon stock.

Sexual harassment claims against former Fox News chief Roger Ailes failed to dent the company's performance. It's possible that similar accusations against its star host Bill O'Reilly may have little impact as well.

Fox (FOXA) stock is up more than 15% this year and about 40% from the 52-week low they hit last September, shortly after Ailes left the company.

The stock has also outperformed the broader market and all its major media rivals over the past six months too -- CNN owner Time Warner (TWX), CBS (CBS), Viacom (VIAB), Disney (DIS) and NBC parent company Comcast (CMCSA).

O'Reilly, of course, is the biggest star at Fox News. And if things play out in a similar fashion as with Ailes and O'Reilly is forced out (which is an admittedly big if), that would be a big blow to the network. But would it hurt 21st Century Fox all that much?

Related: Fox News hit with new Ailes harassment suit

Fox News is part of the overall company's biggest unit. The cable network division at the parent company accounts for more than half of 21st Century Fox's total sales and two-thirds of its operating profits.

Earnings were up 6% in the most recent quarter and revenue rose 7%.

The cable business also includes the national Fox Sports 1 network as well as several regional sports channels, the FX entertainment channel and the National Geographic family of networks.

Any problems related to O'Reilly will presumably have little or no impact on these other networks.

Related: Fox braces for fallout from Bill O'Reilly scandal

While an advertiser might pull the plug on Fox News because of the allegations against O'Reilly, it seems unlikely that the same advertiser would stop airing commercials during MLB games on Fox Sports or the upcoming new season of "Fargo" on FX.

It's also not clear if Fox News viewers would snub the network if O'Reilly were to leave, especially since many of them are attracted to the network for its pro-President Trump coverage and shows and hosts beyond O'Reilly.

Then there's the rest of 21st Century Fox, which is actually doing quite well.

The broadcast division, i.e. the Fox channel that's home to hit shows like "Empire" and "Gotham" as well as that Sunday night animated gift that keeps on giving -- "The Simpsons" -- has been a star lately.

The Fox broadcast network had a banner year, thanks largely to local political advertising and the ratings success of sports, most notably last fall's epic World Series matchup between the Chicago Cubs and Cleveland Indians.

Revenue from the Fox broadcast network in its most recent quarter was up 12% while operating profit surged 35% from a year ago.

Related: 21st Century Fox stands by Bill O'Reilly

Fox also has a huge movie studio business. It posted mixed results in the latest quarter though. Box office revenues were sluggish due to a lack of big hits in the past few months.

But the studio's profits were lifted by the continued strength of on-demand sales of movies released earlier last year, such as "Deadpool" and "Miss Peregrine's Home for Peculiar Children."

So as long as Fox keeps making hit movies, top shows for its cable and broadcast networks and hitting it out of the park with baseball, Fox stock may continue to do well.

O'Reilly and Fox News are important parts of the Fox story of course. But they're hardly the only reason that investors have flocked to the stock for the past few months.