Question for Mia AI Bot: Universe Selection Immediate Loading
“Hello Mia! I need help with QuantConnect Universe Selection. I want to load stocks immediately when the algorithm starts, then continue with weekly updates.


Current Situation
My algorithm uses:

Problem
• Universe selection runs only on Mondays after market close
• If I start the algorithm on Tuesday-Sunday, no stocks are loaded until next Monday
• The algorithm shows: “Total active stocks: 1” (only SPY)


What I Want
1. Immediate loading: Load 900 stocks immediately when algorithm starts (in `initialize()`)
2. Weekly updates: Continue updating the universe every Monday as scheduled
3. No duplicate work: Don’t load stocks twice on Monday if algorithm starts on Monday


Questions
1. How to trigger universe selection immediately in `initialize()`?
◦ Should I use `set_warm_up()`?
◦ Should I manually call `coarse_selection_function()`?
◦ Is there a better way?
2. Will `set_warm_up()` work for universe selection?

◦ Does this trigger `coarse_selection_function` immediately?
◦ Or does it only warm up indicators?
3. Alternative approach: Manual universe on first run?

4. How to get coarse data in `initialize()`?
◦ Can I call `self.history()` to get coarse data?
◦ Can I use `self.coarse_universe_history()`?
◦ What’s the correct way?
5. Best practice for this scenario?
◦ What’s the recommended approach for immediate + scheduled universe updates?
◦ Should I use a flag to track first run?


Example Code Request
Please provide a complete example showing:

1. How to load universe immediately in `initialize()`
2. How to schedule weekly updates
3. How to avoid duplicate loading on Monday


My Environment
• Platform: QuantConnect Cloud
• Mode: Live Trading (Paper)
• Universe Size: 900 stocks
• Update Frequency: Weekly (Monday after market close)


Thank you for your help! 🙏”*