Lean
Lean copied to clipboard
Universes immediate selection
Description
This ads a general solution for immediate universe selection for:
- Continuous futures universes
- Future chain universes
- Constituents universes
- ETF constituents universes
- Fundamentals
- Custom universes
Sample use case is presented in #6474, were a future is not mapped the first time OnData is called. In general, the first universe selection should be performed right when the algorithm starts.
The PR also adds tests that assert universe is selected immediately in live trading.
Related Issue
Closes #6474
Motivation and Context
Requires Documentation Change
How Has This Been Tested?
- Unit tests
- Regression algorithms
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Refactor (non-breaking change which improves implementation)
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Non-functional change (xml comments/documentation/etc)
Checklist:
- [x] My code follows the code style of this project.
- [x] I have read the CONTRIBUTING document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] My branch follows the naming convention
bug-<issue#>-<description>orfeature-<issue#>-<description>