feat: round 3 — LRU cache eviction, OHLCV validation, silent exception logging, Order UUID, slippage cap, BB/SR rendering, multi-stock switcher#38
Merged
Conversation
…arning, debug logging, Order UUID, VolumeSlippage cap, BB/SR rendering, multi-stock switcher
Copilot
AI
changed the title
feat: EasyQuant 第三轮优化 — 数据层加固、回测可信度、Report 丰富度
feat: round 3 — LRU cache eviction, OHLCV validation, silent exception logging, Order UUID, slippage cap, BB/SR rendering, multi-stock switcher
May 28, 2026
Copilot created this pull request from a session on behalf of
AlanFokCo
May 28, 2026 09:33
View session
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.
Third optimization round addressing unbounded memory growth in the data cache, silent error swallowing, order ID collisions under fast iteration, and missing chart overlays in the report viewer.
Data layer
_cachereplaced withOrderedDict+ eviction at 200 entries to prevent unbounded growth in walk-forward / paper trading_validate_ohlcv()rejects frames missing required columns, non-positive close, or high < low — skips to next source on failure_warn_calendar_coverage()emitsUserWarningwhenend_date.year > 2028(hardcoded holiday list limit)except Exception: pass→except Exception as e: log.debug(...)— control flow unchanged, failures now observableBacktest reliability
datetime.now().strftime(...)→uuid.uuid4().hex[:12]impact_pctnow clamped tomax_slippage_pct(default 5%) to prevent runaway slippage at low volume:simple_factor_analysis()now explicitly states it is not a Fama-French modelReport viewer (ReportViewer.tsx)
bb_upper/middle/lower_data(dashed) andsupport/resistance_data(dotted) on the K-line chart — type fields already existed but were unusedsymbols_listhas >1 entry, renders a<select>dropdown that mergessymbols_data[symbol]into the effective chart data viaselectedSymbolstateAll 391 existing tests pass, 0 CodeQL alerts.