Skip to content

chore(locale): 将部分繁体字修正为简体字#8

Merged
brokermr810 merged 1 commit into
OpenByteInc:mainfrom
luoshan5261486:main
Jan 6, 2026
Merged

chore(locale): 将部分繁体字修正为简体字#8
brokermr810 merged 1 commit into
OpenByteInc:mainfrom
luoshan5261486:main

Conversation

@luoshan5261486

Copy link
Copy Markdown
Contributor

No description provided.

@brokermr810
brokermr810 merged commit dde4f01 into OpenByteInc:main Jan 6, 2026
2 checks passed
ccccc-ocean pushed a commit to ccccc-ocean/QuantDinger that referenced this pull request May 6, 2026
C1: ran 08 Donchian and 09 MACD unchanged across BTC / ETH / SOL
(2023-06 ~ 2026-04). Results diverge heavily — BTC +57~84%, SOL
+287~356%, ETH -18~30%. Strategies are not BTC-overfit, but both pick
assets; ETH fails on 2023-26 sideways regime.

Takeaway (core insight OpenByteInc#8): same strategy × different symbol can span
-30% to +356%. BTC performance does not generalize; every target symbol
must be independently validated before going live.

Also adds _create_paper_strategies.py — provisions 4 signal-mode
paper-trading strategies (08×BTC, 08×SOL, 09×BTC, 09×SOL) for the
upcoming month-long backtest-vs-live consistency check.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
bs5189-web pushed a commit to bs5189-web/QuantDinger that referenced this pull request Jun 25, 2026
… R1-a inheritance + R16 akshare check

Applies the Phase A v1.1 must-fix items on top of the v1.0 commit
b48b10b after V-189 v1.1 board approval (f40250f2, 2026-06-15 21:10:46Z).

- R1 OpenByteInc#8 (must-fix): app/routes/market.py _RE_CN_A_SHARE validator now
  accepts market in ('CNStock', 'ETF') instead of just 'CNStock'. Without
  this, adding 510050 as ETF was rejected with "market must be CNStock,
  not ETF". V-110 v1.2 closeout had missed the third VALID_MARKETS/ETF
  registration site.

- R1-a (§5.15/5.16, must-fix): ETFDataSource now extends
  CNStockDataSource (was BaseDataSource) and get_kline delegates the
  full 4-tier fallback to super(). The only ETF-specific behaviour is
  the IOPV / premium / amount_per-share overlay via attach_etf_extras.
  R3-b ETF 限定 preserved: CNStockDataSource ticker shape has no IOPV
  keys; ETFDataSource.get_ticker calls super() then enriches with the
  AkShare fund_etf_spot_em row.

- R16 (A-D-8, must-add): akshare>=1.12.0 version check at ETF module
  load. Older builds degrade silently to the seed list with no
  diagnostic; this now emits a clear warning at startup.

- test_etf_e2e.py: stubs now target cn_stock / tencent modules since
  the tier helpers moved out of etf.py into the super() call chain.

- tests/test_etf_validator.py: 8 new regression cases pinning the R1 OpenByteInc#8
  fix (ETF + 6-digit accepted, Crypto/USStock/HKStock + 6-digit still
  rejected, non-6-digit and empty/unknown-market paths unchanged).

Phase A DoD A-D-1..A-D-8 (incl. A-D-7: 8+ new tests) all green.
Test surface: 190 passed across ETF / market_visibility / factory /
market / e2e suites (60 ETF-related + 8 new validator + 122 adjacent).

The 4 P0 items (min_commission, etf_limit_pct.py, fill_price=close,
T+0 effective_date) are Phase B per V-189 v1.1 §4 and out of V-192
scope; tracked separately as a Phase B issue.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
bs5189-web pushed a commit to bs5189-web/QuantDinger that referenced this pull request Jun 25, 2026
V-192 v1.1 Phase A's 7-item must-fix (commit 208503d) shipped the
existence-check validator fix for 6-digit CN/ETF code pairs (R1 OpenByteInc#8),
but the existence check itself — _resolve_symbol_name_bounded +
seed_get_symbol_name — still has no ETF branch, and the
_NAME_REQUIRED_MARKETS set doesn't include ETF. So a user submitting
{market: CNStock, symbol: 513190} (港股通互联网 ETF) still hits the
"not found on CNStock" path even though the row is a valid ETF.

This commit closes V-189's 2026-06-17 re-open with the six sub-tasks
F.1-F.6 the CEO scoped in V-208:

  F.1  market.py add_watchlist: when CNStock resolve fails for a
       6-digit code, fall through to the ETF resolver; on success,
       silently reroute the row to market=ETF and surface the
       reroute in the response data so the frontend can toast it.
       Enhanced 400 message: "Symbol X not found on CNStock; did you
       mean ETF? If this is an ETF (5xxxxx = SSE / 1xxxxx = SZSE
       code), retry with market=ETF."

  F.2  symbol_name.resolve_symbol_name: add an ETF branch that
       consults etf._seed_universe (offline) and fetch_etf_universe
       (cached 24h AkShare). Resolved names are persisted to
       qd_market_symbols via persist_seed_name (now that ETF is in
       _CACHEABLE_MARKETS).

  F.3  _NAME_REQUIRED_MARKETS: add ETF. ETF now runs the existence
       check rather than skipping it — a 6-digit code that isn't in
       the ETF universe is rejected with a generic "not found on
       ETF" 400.

  F.4  etf._ETF_SEED_LIST: expand from 8 → 14 codes, adding 513190
       (the V-189 re-open trigger case) plus 159919 / 510330 / 512760
       / 515790 / 588000. fetch_etf_universe() continues to supersede
       the seed list at runtime; the seed is the AkShare-offline
       fallback for the picker UX and the cross-market probe.

  F.5  tests/test_etf_cross_market.py: 9 new cases covering the
       CNStock→ETF reroute (F.1, F.3), the seed-only reroute path,
       the real-CNStock no-reroute path, the did-you-mean-ETF 400
       message, the ETF-path existence check (F.3) on known and
       unknown codes, and the resolve_symbol_name ETF branch's
       offline-fallback contract.

  F.6  docs/ETF_TRADING_GUIDE_CN.md: new Chinese-language guide
       covering the 6-digit code matrix, the cross-market reroute,
       the 4-tier K-line fallback, the IOPV / premium_rate
       contract, the AkShare-offline seed fallback, the F-A-Q, and
       the F.1 reroute response shape.

DoD (V-208 v1):
  F-D-1  513190 + CNStock → auto-reroute ETF, 200           PASS
  F-D-2  999999 + CNStock → 400 with "did you mean ETF?"    PASS
  F-D-3  9 new tests in test_etf_cross_market.py            PASS
  F-D-4  ETF in _NAME_REQUIRED_MARKETS, ETF path runs check PASS
  F-D-5  docs/ETF_TRADING_GUIDE_CN.md created               PASS
  F-D-6  resolve_symbol_name ETF branch is graceful offline PASS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
bs5189-web pushed a commit to bs5189-web/QuantDinger that referenced this pull request Jun 25, 2026
V-208 fixed the watchlist add path so a 6-digit SSE/SZSE code submitted
as CNStock (e.g. 513190 = 港股通互联网 ETF) silently reroutes to the ETF
data source when the CN resolver fails. V-189 was re-opened on
2026-06-22 because two read paths were still broken: the indicator-ide
chart loader (GET /api/indicator/kline) and the single-symbol realtime
price (GET /api/market/price). Both called KlineService directly; when
the user typed 513190 on the CNStock tab and never added it to the
watchlist, the CN 4-tier fallback (TwelveData → Tencent → yfinance →
AkShare) returned empty and the user saw 数据加载失败: No data found.

This commit closes the V-189 read-path gap. The probe is a small,
bounded, idempotent wrapper around the ETF data source; it only fires
for market='CNStock' and 6-digit codes so the explicit ETF path cannot
loop. The probe is guarded by a 4-second wall-clock cap and runs in a
thread pool so a hung upstream cannot block the main request.

Changes:
- app/services/kline.py: add _probe_etf_kline / _probe_etf_ticker
  helpers (ThreadPoolExecutor + 4s timeout) and a
  _maybe_probe_etf wrapper that fires only on the CNStock + 6-digit +
  empty-result triple. Existing get_kline / get_realtime_price
  transparently reroute so internal callers (backtest, agent tools) get
  the ETF bars without any code change. New get_kline_with_reroute /
  get_realtime_price_with_reroute return a structured envelope with
  the rerouted marker for the route layer.
- app/routes/kline.py: switch the GET /api/indicator/kline handler to
  get_kline_with_reroute and surface the {rerouted: {...}} flag on the
  response (null on no-reroute, mirrors V-208 watchlist add contract).
- app/routes/market.py: add get_single_price_with_reroute; wire it into
  the /api/market/price single-symbol endpoint. The fan-out
  /api/market/watchlist/prices keeps using the plain get_single_price
  because each row already carries the V-208 write-time rerouted market
  (so the read path is naturally correct without an extra flag).
- tests/test_kline_cross_market.py: 10 new cases covering the headline
  513190 reroute, 999999 no-reroute, non-6-digit skip, explicit ETF
  no-reprobe, probe wall-clock timeout, and the service-layer
  back-compat envelope. All 10 pass; existing ETF tests (27) unaffected.
- docs/ETF_TRADING_GUIDE_CN.md: add §7.3 documenting the V-246 contract
  and updating the §7.2 SSOT checklist + test count to 105.

R1 OpenByteInc#8 cross-market probing is now fully closed: write (V-208) + read
(F.1/F.2 here) paths both reroute, and the user gets a soft
"auto-routed to ETF" toast on the indicator-ide chart loader.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants