I'm trying to get some fundamental data from the stocks, but the value returned is always zero. How do we have access to fundamental data, is that possible?

In the example below, the PB Ratio and Market Cap is always zero for every symbol.


class AlgorithmFundamentalsTest(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2023, 8, 1)
        self.SetEndDate(2023, 8, 10)

        self.AddUniverse(self.Select)

        self.universe = {}

        self.Schedule.On(
            self.DateRules.EveryDay(),
            self.TimeRules.At(hour=12),
            self.LogFundamentals)
        
    def OnData(self, data):
        pass
                 
    def OnSecuritiesChanged(self, changes):

        for s in changes.AddedSecurities:

            if str(s.Symbol) not in self.universe:

                self.universe[str(s.Symbol)] = s
                
        for s in changes.RemovedSecurities:
            
            if str(s.Symbol) in self.universe.keys():
                
                self.universe.pop(str(s.Symbol))

    def Select(self, symbols):

        selected = [c for c in symbols if c.HasFundamentalData]
        sorted_by_dollar_volume = sorted(selected, key=lambda c: c.DollarVolume, reverse=True)
        return [ c.Symbol for c in sorted_by_dollar_volume[:10] ]

    def LogFundamentals(self):

        for symbol in self.universe.keys():

            # The returned values here are always zero
            self.Log('%s   Market Cap: %.2f  PB Ratio: %.2f' %
                (symbol,
                self.universe[symbol].Fundamentals.MarketCap,
                self.universe[symbol].Fundamentals.ValuationRatios.PBRatio,
                ))