Unify alternative-data chain templates and fix non-chain bugs#2409
Merged
AlexCatarino merged 2 commits intoMay 13, 2026
Merged
Conversation
- alternative-data-universe-eodhdupcomingipos: drop invalid `from QuantConnect.DataSource.EODHD import DealType` Py import (EODHD is a class, not a module); guard C# `Min().Value` against an all-null price band so the algorithm no longer throws "Nullable object must have a value". - alternative-data-universe-quivercnbcsuniverse, alternative-data-universe-quiverquantcongressuniverse, alternative-data-universe-smartinsiderintentionuniverse, alternative-data-universe-smartinsidertransactionuniverse: set `seed_initial_prices = True` so newly-joined equities have a price at the 9:00 ET rebalance, guard rebalance with a `price > 0` filter, and cap individual weights at `min(1/N, 0.1)` so sparse-day universes don't trigger insufficient-buying-power rejections. - alternative-data-universe-smartinsiderintentionuniverse: drop the `USDMarketCap > 100_000_000` filter (the field isn't populated for intention records in the dataset, so the filter rejected every row). - custom-indicator Py: set `data_normalization_mode = RAW` to match the C# template so both implementations consume the same SPY series.
…attern All 14 alt-data chain templates now share one shape, with only the alt-data filter expression differing between them: - First universe stores every US Equity fundamental and emits Universe.Unchanged. - Second universe filters alt-data into a `alt` set, plots its size as Universe/Raw, then intersects with the cached fundamentals and keeps the 100 most liquid by dollar volume. - Scheduled rebalance at 9:00 ET with a `min(1/N, 0.1)` weight cap so sparse-day universes don't trigger insufficient-buying-power rejections. - C# uses method-syntax LINQ throughout. Other changes folded in: - alternative-data-chain-universe-eodhdupcomingipos: maintain an `_ipo_dates` map and trade an IPO seven days after the listing so Morningstar fundamentals have caught up. Previously the chain produced zero orders because IPO names aren't yet in the fundamental universe. - alternative-data-chain-universe-smartinsiderintentionuniverse: drop the unused `USDMarketCap > 100_000_000` filter (the field isn't populated for intention records). - alternative-data-chain-universe-quiverquantcongressuniverse: fix C# `OfType<QuiverCongressDataPoint>` to `OfType<QuiverQuantCongressUniverse>` so the same rows that Python iterates are visible to C#. Doc examples in `03 Writing Algorithms/12 Universes/03 Equity/04 Chained Universes/` updated to match: the fundamental + alt-data example now actually trades (1458 orders, +14.35%, Sharpe 1.65), and the ETF + alt-data example ranks by `Weight` and drops alt names that aren't in SPY (889 orders, +12.15%, Sharpe 1.78).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
alternative-data-chain-universe-*project templates around one shape — only the alt-data filter expression differs between them. The first universe caches every US Equity fundamental, the second intersects the alt-data filter with that cache, ranks by dollar volume, and keeps the 100 most liquid. A scheduled 9:00 ET rebalance applies amin(1/N, 0.1)weight cap so sparse-day universes don't hit insufficient-buying-power rejections.eodhdupcomingiposPy, guardMin().Valueon an all-null price band ineodhdupcomingiposC#, addseed_initial_prices = Trueso newly-joined equities have a price at the 9:00 rebalance, and drop the unpopulatedUSDMarketCapfilter insmartinsiderintentionuniverse.Chain Fundamental and Alternative DataandChain ETF and Alternative Datadoc examples to the new pattern so they actually trade.custom-indicatorPy to useDataNormalizationMode.RAWto match the C# template.Test plan
python project-templates/python/run_syntax_check.py— 100% across all 72 Python templates.