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! 🙏”*
Mia Alissi
Key takeaways & workflow:
self.history()to fetch the current top stocks by dollar volume.This is best-practice for immediate and scheduled universe updates on QuantConnect Cloud/live, as per your requirements!
Sources: US Equity Coarse Universe - QuantConnect.com, Fundamental Universes - QuantConnect.com, docs writing algorithms universes dataless scheduled universes, Key Concepts - QuantConnect.com, True Beats - QuantConnect.com
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
مطلق الشمري
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!