I would be curious if anyone has worked out how Morningstar or Quantconnect calculates "OperationRatios.LongTermDebtEquityRatio.ThreeMonths" where a stock has negative equity.

Cogent Communications (ticker CCOI) has negative shareholder's equity and has done so for some years. How then should you calculate its "OperationRatios.LongTermDebtEquityRatio.ThreeMonths"? Most people come up with a fairly useless negative value .

As you will see from the attached Notebook extract below, a figure of 

520.151543

is arrived at for this ratio as of yesterday's date for ticker CCOI

How is this calculated? No explanation is given and shareholder's equity is stated as "None" rather than a negative figure.

An explanation would be welcome!

qb = QuantBook()
CCOI= qb.AddEquity("CCOI")

de = qb.GetFundamental(qb.Securities.Keys, "OperationRatios.LongTermDebtEquityRatio.ThreeMonths", start_time, end_time)
de

COI SBZ72LELB97P
2021-05-12 520.151543
2021-05-13 520.151543