Question for Mia: Empty Fundamental History in Live Mode

"Hello Mia! I'm getting empty data when trying to load universe immediately in Live Mode. Need your help!"

 

 

The Problem

My code returns 0 stocks when trying to bootstrap universe in initialize():

Python

 

 

def initialize(self): self.spy_symbol = self.add_equity("SPY", Resolution.MINUTE).symbol # Try to load stocks immediately self.log("[Initialize] تحميل الأسهم فوراً...") reference_time = self.time - timedelta(days=1) initial_symbols = self._get_top_dollar_volume_symbols(reference_time) self.log(f"[Initialize] تم تحميل {len(initial_symbols)} سهم") # Shows: 0 stocks! def _get_top_dollar_volume_symbols(self, reference_time): fundamental_history = self.history( Fundamental, reference_time, reference_time, Resolution.DAILY ) fundamental_list = [] if not fundamental_history.empty: # This is EMPTY! # ... filtering logic return [f.symbol for f in top]

 

 

Log Output

Plain Text

 

 

[Initialize] تحميل الأسهم فوراً... [Initialize] تم تحميل 0 سهم [OnSecuritiesChanged] إجمالي الأسهم النشطة: 1 (only SPY)

 

 

Questions

1.Why is fundamental_history empty?

•Is reference_time = self.time - timedelta(days=1) correct?

•Does self.time work correctly in initialize() in Live Mode?

•Should I use a different reference time?

2.Does self.history(Fundamental, ...) work in Live Mode?

•Is Fundamental data available in Live Mode?

•Do I need a subscription or special permissions?

•Is there a different API for Live Mode?

3.Alternative approach for Live Mode?

•Should I use self.coarse_universe_history() instead?

•Should I use a fixed list of symbols (like SP500)?

•What's the recommended way to bootstrap universe in Live Mode?

4.How to debug this?

•How can I check if fundamental_history has data?

•How can I see what reference_time value is?

•Any logging I should add?

 

 

My Environment

•Platform: QuantConnect Cloud

•Mode: Live Trading (Paper)

•Goal: Load 900 stocks immediately when algorithm starts

•Current Result: 0 stocks loaded

 

 

What I Need

Please provide:

1.Explanation of why data is empty

2.Correct code to load stocks in Live Mode initialize()

3.Alternative approach if Fundamental history doesn't work in Live Mode

4.Best practice for immediate universe loading in Live Mode

 

 

Thank you! 🙏