Fix contract symbol parsing for ambiguous roots like MYM#9
Open
adamoverton wants to merge 6 commits intoQuantConnect:masterfrom
Open
Fix contract symbol parsing for ambiguous roots like MYM#9adamoverton wants to merge 6 commits intoQuantConnect:masterfrom
adamoverton wants to merge 6 commits intoQuantConnect:masterfrom
Conversation
Update target framework from net9.0 to net10.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Databento returns OHLCV prices as fixed-point integers scaled by 10^9. The DatabentoBar class was parsing these as raw decimals, resulting in prices like 6707750000000 instead of 6707.75. - Change OHLCV fields from decimal to long (OpenRaw, HighRaw, etc.) - Apply PriceScaleFactor (1e-9) to get actual prices - Volume remains as long (not scaled) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Log history requests and rejection reasons at Trace level to help debug DataBento integration issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features: - Add [Export] attribute for MEF plugin discovery - Add intraday replay support via databento-replay-start config - "0" for full replay, ISO datetime for specific time, omit for 15-min default - Support canonical (continuous) futures symbols - Use tick-level schemas (trades, mbp-1) for live streaming - LEAN aggregator consolidates ticks into bars Fixes: - Fix volume parsing in OHLCV bars (parse string to long) Improvements: - Reduce logging verbosity (remove per-tick spam) - Add controlled logging for trade bars (first 10, then every 50th) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous parsing logic failed for symbols like MYMH6 where the month code (H=March) appears within the root symbol (MYM). The parser would incorrectly identify M as the month code. Changes: - Parse from end of symbol: find year digits first, then month code - Added MonthCodeToMonth dictionary with all CME month codes - Added ParseDatabentoContractSymbol as public method for testing - Added SymbolMappingReceived event for contract resolution tracking - Implemented IDataQueueUniverseProvider interface in DataBentoDataProvider - Added LookupSymbols() and CanPerformSelection() for futures universe support - Track resolved contracts in _resolvedContracts dictionary - Added comprehensive unit tests for contract parsing Test cases verified: - MYMH6 -> MYM March 2026 (bug case) - ESZ25 -> ES December 2025 - NQM6 -> NQ June 2026 - YMH26 -> YM March 2026 (2-digit year) - MESF7 -> MES January 2027 - CLG26 -> CL February 2026 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Hey, @adamoverton |
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
ParseDatabentoContractSymbol()to parse from end of symbol (year digits → month code → root)MonthCodeToMonthdictionary with all CME month codes (F,G,H,J,K,M,N,Q,U,V,X,Z)IDataQueueUniverseProviderinterface inDataBentoDataProviderLookupSymbols()andCanPerformSelection()for futures universe supportProblem
The previous parsing logic failed for symbols like
MYMH6where the month code (H=March) appears within the root symbol (MYM). The parser would incorrectly identifyMas the month code, resulting in wrong contract resolution.Solution
Parse from the end of the symbol:
Test cases verified
Test plan
🤖 Generated with Claude Code