Commit d1337ea
authored
Feat:
* feat: add CanonicalDataDownloaderDecorator for chain support
Introduced CanonicalDataDownloaderDecorator to enable automatic resolution and parallel downloading of all contracts for canonical symbols (options and futures chains). Updated Program.cs and DownloaderDataProvider to use this decorator, ensuring seamless data retrieval for both canonical and non-canonical symbols. Refactored initialization logic to handle chain providers within the decorator and removed redundant code from Program.cs.
* feat: improve canonical symbol error handling in data downloader
* refactor: data downloader selection in DownloaderDataProvider
* refactor: CanonicalDataDownloaderDecorator construction
* feat: limit parallelism and improve contract data error handling
* refactor: canonical data downloader and provider usage
* remove: CanonicalNotSupportedException and refactor handling
* refactor: data downloader selection with selector class
Introduce DataDownloaderSelector to choose the correct IDataDownloader implementation based on data type, using CanonicalDataDownloaderDecorator only when needed. Update Program.cs and DownloaderDataProvider to use the selector, remove redundant initialization logic, and ensure proper resource disposal. This improves flexibility, correctness, and resource management for data downloads, especially for custom and canonical data types.
* fix: wrong selector condition
* refactor: change default log handler; add parallelism config to downloader
- Set ConsoleLogHandler as the default log handler in code and config
- Make contract download parallelism configurable via downloader-thread-count (default 4)
- Track and log number of processed contracts in CanonicalDataDownloaderDecorator
- Add error logging for missing universe data
- Improve logging clarity and code readability
* feat: prevent duplicate contract downloads in canonical chains
Introduce ContractDownloadParameters to uniquely identify contract/tick type/resolution combinations and cache them in CanonicalDataDownloaderDecorator, avoiding redundant downloads when contracts are shared across canonical symbol chains. Add date range optimization for contract downloads and unit tests for the new class.
* Revert "feat: prevent duplicate contract downloads in canonical chains"
This reverts commit 44386c4.
* feat: clamp contract date ranges, deduplicate downloads
Added AdjustDateRangeForContract to CanonicalDataDownloaderDecorator to clamp start/end dates based on contract expiry and security type. Introduced _contractsCache to prevent duplicate downloads across canonical chains and _processedContracts for logging. Updated contract retrieval logic for deduplication. Added NUnit tests to verify date range adjustments for futures and options.
* refactor: canonical contract date range adjustment logic
* test:feat: add test for non-option/future contract date adjustment
* feat: make look-back periods for canonical symbols configurable
* refactor: remove Lazy from CanonicalDataDownloaderDecorator
Revert "refactor: remove Lazy from CanonicalDataDownloaderDecorator"
This reverts commit 909c129.
refactor: Inject IMapFileProvider into downloader selectors
Revert "refactor: Inject IMapFileProvider into downloader selectors"
This reverts commit 0add952.
Reapply "refactor: remove Lazy from CanonicalDataDownloaderDecorator"
This reverts commit 9e3c4be.
* refactor: data downloader dependency injection
* refactor: provider initialization in data downloader classes
* refactor: DataDownloaderSelector dependencies, add tests
- Require explicit IDataProvider in DataDownloaderSelector constructor, removing default and fallback logic
- Change default log handler to ConsoleLogHandler in Program.cs
- Pass DownloaderDataProvider as IDataProvider to DataDownloaderSelector
- Add DataDownloaderSelector unit tests to verify correct downloader selection and decorator usage
* feat: ensure factorFileProvider is initialized when defaulted
* fix: missed dataProvider in DataDownloaderSelector ctor
* refactor: improve IFactorFileProvider resolution in DataDownloaderSelectorCanonicalDataDownloaderDecorator for chain support (#9299)1 parent 7333dd3 commit d1337ea
7 files changed
Lines changed: 532 additions & 32 deletions
File tree
- DownloaderDataProvider
- Engine/DataFeeds
- DataDownloader
- Tests/Engine/DataFeeds/DataDownloader
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
170 | | - | |
| 169 | + | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
209 | | - | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
| 211 | + | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 217 | | |
231 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
232 | 222 | | |
233 | 223 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments